PHP Classes

File: example_RSS.php

Recommend this page to a friend!
  Classes of Armin   simpleTagReader   example_RSS.php   Download  
File: example_RSS.php
Role: Example script
Content type: text/plain
Description: example
Class: simpleTagReader
Extract values from tag based documents
Author: By
Last change:
Date: 14 years ago
Size: 578 bytes


Class file image Download
// read current weather conditions in Tabriz/Iran from Yahoo! Weather

$City = "IRXX0016";
$Unit = "c"; // c or f
$yahooWeather = new simpleTagReader(''.$City.'&u='.$Unit.'');

$result = $yahooWeather->readAllTags('description');//first Tag: $result[0] & Second(Last) Tag: $result[1]
echo substr($result[1], 9, -3);

"<br />OR<br />";

$result = $yahooWeather->readTag('description', 2);//to read first Tag: $yahooWeather->readTag('description', 1);
echo substr($result, 9, -3);