Jump to content

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


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

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.