Hi there, I'd like to retreive 3 pieces of information about TV episodes from TV.com: the airdate, the writer and the director of the episode, e.g. from here. Does anyone know how I can do this? Could I do this for example by retreiving the source code of the page, and then using strpos()?
Yep, essentially you want to grab the page source code using sockets, file_get_contents (probably the simplest) or curl and then extract the data generally using regular expressions. strpos and similar functions could probably be used but regular expressions give you more flexibility and will be easier in the long run (although the learning curve is admittedly steeper).
I'm having trouble outputting the source code of the page using PHP - when I use file_get_contents I get the following error: Could someone please explain how I can output the source code?
That means allow_url_fopen has been disabled in php.ini. Either try to talk to the guys from your hosting and ask if they can enable it, or see if cURL is installed.
You might want to see if you can pull that information from one of their feeds: http://www.tv.com/feature/rss/ That way, if they decide to change something ever so slightly, you won't need to completely rewrite your code.