Page 1 of 1

Download html source code using a PHP file?

Posted: Mon May 28, 2007 3:16 pm
by ykarmi
Hey guys!
Here's what I want to do:
I want to create an RSS feed (for self-usage) for a website I do not own - what I intend to do - is download the source code from the website I want to information from - and then run a replace string to <a href=""> on there and replace it with xml tags that will be readable as an RSS feed.
In order to do that, I need to download the source code of the page - dynamically (since it changes every few minutes) - how is that done?
Thank you very much,
ykarmi :D

Posted: Mon May 28, 2007 3:22 pm
by superdezign
You mean, each time the page is loaded, or cron?

And, you need to know how to get the HTML? Wouldn't you just open the file? I've never tried it, but I assume that's how it'd be done.

Posted: Mon May 28, 2007 3:49 pm
by John Cartwright
I hope you have permission from the site owners to use their content :?

Reguardless, file_get_contents() should help