View Full Version : Making Search Spider Follow Links?

08-04-2004, 11:15 AM
I was wondering how you make search spiders keep on following links. My spider is in php. Here is what I have so far:

function search() {
global $url;
$site = $url;
$data = file_get_contents($site);
if (preg_match_all("/http:\/\/[^\"\s']+/", $data, $links) {
for ($i=0;$i<count($links[0]);$i++) {
echo "<font size=\"2\" face=\"verdana\">".$links[0][$i]."</font><br>";

08-08-2004, 05:22 PM
Hi. Maybe just download PhpDig and have a look at the code?