Jump to content

Mmh ... Can't Find a PHP Scraper Code or PHP Comments Library. Do You Know Where


vanleurth

Recommended Posts

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.

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 />';
}
?>

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.