PDA

View Full Version : retrieve text from a different domain


bfsog
10-22-2005, 02:55 PM
Is there a way to retrieve text from a page that ia on a different server/domain, and display it on yours?

I know this infringes on bandwidth, but I am just learning.

For instance, lets say tv listings, I have a page called monday.php

On monday.php I want the four lines of text describing this episode (http://www.neighbours.com/australia_monday.html).

Is that possible? Can I choose which content I want and do not want?

Cheers

bcarl314
10-22-2005, 06:13 PM
Yep, it's possible. I'm assuming that you would get the necessary permissions though ;)

Basically you'd need to get the HTML output from the page - many ways to do this - then parse the html for what you need. Probably using preg_match or something similar.

bfsog
10-22-2005, 06:49 PM
Thanks.

Any tutorials on the subject?

I have checked phpbuilder but do not know which topic it would fall under.