To all who want a work around for the allow_url_include being turned off. With the following code, you will no longer need to use the "allow_url_include".
Place the following in your settings.php file since this is called for every single webpage on your site. (Saratoga/Carterlake Template)
// Include the cURL function for fetching sites (used in place of allow_url_fopen)
function curl_fetch_file($url) {
$curlurl = str_replace("http://", '', $url);
$urlComponents = explode("/", $curlurl);
$domain = $urlComponents[0];
$resourcePath = str_replace($domain, '', $curlurl);
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5); // 5 sec timeout
$data = curl_exec($ch);
curl_close($ch);
}
//
Now, where you would normally place your "include"
Example:
<?php include("http://www.relayweather.com/rss-tropical-test.php?inc=Y&summary=Y&zone=A");?>
Place the following instead using the same url as above:
<?php curl_fetch_file("http://www.relayweather.com/rss-tropical-test.php?inc=Y&summary=Y&zone=A")?>
Of course this will work with any url. Using this will allow you to no longer need the "allow_url_include" to be set to "on" in your php configuration.
Regards,
Michael