Hello.
I found script on forum. Works great for me but how to change data (temperature) to celcius.
How to for exp. add to ".$weather_chile->forecast['CURRENT']['TEMP']. this function to get Celcius (([°F] − 32) × 5⁄9)
Here is a code.
<html>
<head>
</head>
<body>
<?
include("class.xml.parser.php");
include("class.weather.php");
$timeout=3*60*60; // 3 hours
if (isset($_ENV["TEMP"]))
$cachedir=$_ENV["TEMP"];
else if (isset($_ENV["TMP"]))
$cachedir=$_ENV["TMP"];
else if (isset($_ENV["TMPDIR"]))
$cachedir=$_ENV["TMPDIR"];
else
$cachedir="/tmp";
$cachedir=str_replace('\\\\','/',$cachedir);
if (substr($cachedir,-1)!='/') $cachedir.='/';
$weather_chile = new weather("CAXX0518", 3600, "C", $cachedir);
$weather_chile->parsecached();
print "<img src=http://us.i1.yimg.com/us.yimg.com/i/us/we/52/".$weather_chile->forecast['CURRENT']['CODE'].".gif>";
print "<h1>Actual Situation</h1>";
print "acttext: ".$weather_chile->forecast['CURRENT']['TEXT']."<br>";
print "acttemp: ".$weather_chile->forecast['CURRENT']['TEMP']."<br>";
print "acttime: ".$weather_chile->forecast['CURRENT']['DATE']."<br>";
print "actcode: ".$weather_chile->forecast['CURRENT']['CODE']."<br>";
?>
</body>
</html>
Is there any way to add thi