I would like to fetch an iCal-calendar from external websites (Google, etc.) with the event_calendar_module. To do this I have to use proxy for url-requests from the SS. The iCal.php uses
$ical = file_get_contents($file);
and not the SimplePie-Framework to do this, right?So I've replaced file_get_content($file) with a call of a function with curl_opts:
function curl_get_file_contents($URL)
{
$c = curl_init($URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
curl_setopt($c, CURLOPT_PROXY, "proxy.webserver.com");
curl_setopt($c, CURLOPT_PORT, 3128);
curl_setopt($c, CURLOPT_PROXYUSERPWD, "user:password");
$contents = curl_exec($c);
curl_close($c);
if ($contents) return $contents;
else return FALSE;
}
Unfortunately I don't have PHP-knowledges so I didn't have success at all: Call to undefined function curl_get_file_contents() :-(
What's the error in reasoning?