Hello all,
Since my host doesn't allow using most file open protocols, I am forced to use cURL, which I am not familiar with. This, however, screws up my script royally, and I now get the following error:
Fatal error: Call to undefined method DOMDocument::curl_exec() in /path/removed/for/security/purposes/mirollercoast.com/sidebar/todayinthepark.php on line 10
And "todayinthepark.php" is the following code:
<?php
$url = "http://www.weather.gov/data/current_obs/KMKG.xml";
$doc = new DOMDocument();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$doc->curl_exec($ch);
$obs = $doc->getElementsByTagName( "current_observation" );
foreach( $obs as $cobs )
{
$weather = $cobs->getElementsByTagName( "weather" );
$wthr = $weather->item(0)->nodeValue;
$image = $cobs->getElementsByTagName( "icon_url_name" );
$wimg = $image->item(0)->nodeValue;
$temps = $cobs->getElementsByTagName( "temp_f" );
$temp = $temps->item(0)->nodeValue;
}
?>
Any help would be GREATLY appreciated as I'm not sure how to fix this problem!
Thanks,
-Jon Roost
www.mirollercoast.com