In your script, I see at the line number 36 this:
PHP Code:
$xml_content = file_get_contents( $xml_source )
Here is where you have to make the change.
Add this function to your script, at the beggining of it, right after the
<?php tag line:
PHP Code:
/**
* Retrieves the url
*
* @param string $url
* @param string $uagent
* @return string
*/
function retrieveUrl($url) {
// create a new CURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// grab URL and pass it to the browser
$result = curl_exec($ch);
// close CURL resource, and free up system resources
curl_close($ch);
return $result;
}
Then change your code at the 36th line into:
PHP Code:
$xml_content = retrieveUrl( $xml_source )
I didn't tested it 'cause I'm on the run, but it should work.