Page 1 of 1
fetch a whole website
Posted: Sun Jul 01, 2007 1:51 pm
by dappa
How can I fetch whole website and then echo only text and links that site have, excluding all pictures and fancy layout?
So what happens for user is that, he inputs some URL and then see text and links that site contains.
Posted: Sun Jul 01, 2007 2:01 pm
by alex.barylski
fopen() w/ allow_url_fopen enabled and some regex.
Posted: Sun Jul 01, 2007 2:01 pm
by s.dot
I don't see a valid reason for doing this.
Posted: Sun Jul 01, 2007 2:12 pm
by dappa
scottayy wrote:I don't see a valid reason for doing this.
Doing this allows me to browse web-sites via my cell phone that have a simple WAP function but no real web-browser.
Posted: Sun Jul 01, 2007 2:15 pm
by s.dot
Oh.
file_get_contents() and a regex matching <a></a> tags would work.
Posted: Sun Jul 01, 2007 2:47 pm
by Chris Corbyn
Check out wget. You can recursively download websites with wget. It's a command line tool though.