Simplexml not working

software development


I’m getting this error trying to use simplexml. I have checked phpinfo and it is installed and running. This little script works fine with no errors locally.

I have removed my youtube dev id.

Here is the script:

echo "test: ".getthumb(“xxxxxxxxx”, “3x_UtxM55JY”) ;

function getthumb($devID, $vidID){
// set the XML file name as a PHP string
$youtube_XML = “” . $devID . “&video_id=” . $vidID ."";
// load the XML file
$xml = simplexml_load_file($youtube_XML) or die (“no file loaded”) ;
// assign the video thumb element to a string
return $xml->video_details->thumbnail_url;

I have contacted DH support, but does anyone out there have any idea? I’m kinda new to php.


Since you are working with URLs, it is likely that you are running into a URL file access problem.

si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


yeah, that’s it, thanks.