Forum Moderators: coopster
The script has a variable $Place1 , I set the destination I want and it goes to a web page and rips the weather from that page (I have received permission to do this)
This script works if the Place doesn't have a special charcter.
This is the problem line
$Place1 = "Šibenik";
Is there anything I need to do to enable special characters?
Thank you very much.
I have the entire script below:
<?
function printWeatherConditions(){
$Place1 = "Šibenik";
$CacheDir = "webcell_cache";
$File1 = "http://www.#*$!.xxx.xx/vrijeme/cro.html";
include("WebCell.php");
$wcObject = new WebCell($File1);
//$wcObject->EnableCache($CacheDir, 3600);
$i=0;
$ack = false;
while($wcObject->GetCell(0,$i,1)!=$Place1 && $wcObject->NumberOfRows(0)>=$i) $i++;
if($i<=$wcObject->NumberOfRows(0)){
$ack = true;
//print "Place: ". $wcObject->GetCell(0,$i,1) . "<BR>";
$airTemp = $wcObject->GetCell(0,$i,4). " ºC";
}
if($ack){
echo "<tr>";
echo "<p><b><font face=\"Arial\" color=\"white\" size=\"1\">$airTemp</font></b></p>";
}
}
printWeatherConditions();
?>