vanleurth Posted March 4, 2011 Share Posted March 4, 2011 Hello happy phpkkies, I search this forum for a sample php code on how to write a links scrapper that will recursively go through each page within a site and pull all the links. Then, I will save them to a database for analysis. I couldn't find something like that. Also, I was wondering if someone has or is selling a comments library in php. This is, a code or a set of functions that are related to commenting systems. For example; the library should have a function for blocking bad words or a function that will let people vote up or down comments made. Any ideas or links will be appreciated, thank you, V. Quote Link to comment https://forums.phpfreaks.com/topic/229600-mmh-cant-find-a-php-scraper-code-or-php-comments-library-do-you-know-where/ Share on other sites More sharing options...
jcbones Posted March 4, 2011 Share Posted March 4, 2011 I would use the simple HTML DOM parser. <?php include('simpleDOMparser.php'); $html = file_get_html('http://site.com/file/to/get.html'); $anchors = $html->find('a'); foreach($anchors as $value) { echo $value . '<br />'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/229600-mmh-cant-find-a-php-scraper-code-or-php-comments-library-do-you-know-where/#findComment-1182931 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.