Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.
I've been reading James Bruce's article on building a basic web crawler (Part 1 and Part 2). It's super clear, but the second example isn't working for me. It's supposed to print a bunch of links, but I just get a blank page. Any ideas what I might be doing wrong?
Thanks!
2012-03-07 08:45:00
Hi Lisa. Did you change the target URL? My old site that was used in the example code is dead now, so it's not going to be able to grab anything from there. $target_url = "http://www.tokyobit.com";try $target_url = "http://www.ipadboardgames.org";instead ;)
2012-03-08 19:32:00
Hi, Bruce. Thanks so much for taking the time to reply. Yes, I tried several different target URLs, but no dice. When I looked at the error log on my site, I saw this message: Filename cannot be empty in simple /home4/swanstre/public_html/bots/simple_html_dom.php on line 555ml_dom.php on line 555thanks so much for your time,Lisa
2012-03-11 08:59:00
Could you post all your code to a pastebin somewhere? I could try running it on my own server - but I think maybe your server is limited in some way thats breaking the Simple HTLMDom parsing...
2012-03-16 19:19:00
hi, bruce -- yes, or if you have an email address that would wouldn't mind throwing my way, that would work too. my address is swanstro at gmail dot com
2012-03-16 19:40:00
I meant James. Gah!
2012-03-18 13:44:00
Sorry, yes. jamesbruce @ this website.