How do I make a simple crawler in PHP?

Meh. Don’t parse HTML with regexes. Here’s a DOM version inspired by Tatu’s: Edit: I fixed some bugs from Tatu’s version (works with relative URLs now). Edit: I added a new bit of functionality that prevents it from following the same URL twice. Edit: echoing output to STDOUT now so you can redirect it to whatever file you want … Read more