Pull schedule off server

Hello… Let me state right up front how grateful I am for any assistance that anyone can give… I am not a back-end developer…and my knowledge of PHP is pretty basic.

I have a client with an internal server which they use for scheduling their internal TV broadcasts. We are in process of a doing a complete web overhaul and migrating the web to Wordpress. We will be using Google Calendar (for a lot of reasons) and setting up a bunch of separate calendars for each group.

The syntax they gave me for the current schedule is as follows (fakeurl.com is not the actual URL of course)


I have asked them if they can output the string in XML or iCal which import directly into Google Calendar. On the good chance that they cannot export in those formats, anyone have any thoughts as to how I can access this file? I have tried creating a PHP code as follows and tested it on my localhost server:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>Untitled Document</title>

// Create a stream
$opts = array(
‘header’=>"Accept-language: en\r
" .
"Cookie: foo=bar\r

$context = stream_context_create($opts);

// Open the file using the HTTP headers set above
$file = file_get_contents('http://fakeurl.com/Cablecast/Plugins/WebSchedule/print.aspx?ChannelID=1&Length=21&Buttons=Generate#06-10-2011 ', false, $context);


After about 30 seconds of trying to run the file, I get the following error:

Warning: file_get_contents(http://fakeurl.com/Cablecast/Plugins/WebSchedule/print.aspx?ChannelID=1&Length=21&Buttons=Generate#06-10-2011 ) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\htdocs\sample-channel-22.php on line 22

this is line 22:
$file = file_get_contents('http://fakeurl.com/Cablecast/Plugins/WebSchedule/print.aspx?ChannelID=1&Length=21&Buttons=Generate#06-10-2011 ', false, $context);

Bottom Line: What I want is to be able to integrate this into either a Wordpress page or (ideally) a Wordpress sidebar and then be able to have it update on refresh. Am I crazy??

Are you using Apache? The fopen wrappers must be enabled.

Ask if the server has safe_mode turned on, and check that allow_url_fopen in the ini is set to yes.