PhpDig.net

Go Back   PhpDig.net > General Forums > Coding & Tutorials

Reply
 
Thread Tools
Old 08-04-2004, 11:15 AM   #1
demo
Green Mole
 
Join Date: Aug 2004
Posts: 1
Making Search Spider Follow Links?

I was wondering how you make search spiders keep on following links. My spider is in php. Here is what I have so far:


Quote:
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>";
}
}
}
demo is offline   Reply With Quote
Old 08-08-2004, 05:22 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Maybe just download PhpDig and have a look at the code?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems making phpdig able to search pdf files butterivenne Script Installation 1 07-29-2008 01:26 PM
spider ignores links Maarten Wijnen Troubleshooting 2 03-17-2005 02:23 PM
Will not follow links td234 Troubleshooting 2 01-27-2005 05:37 AM
spider.php will NOT follow link barik Troubleshooting 0 10-23-2004 06:07 PM
Relative links to follow in meta-refresh and Javascript obottek Mod Requests 4 10-05-2003 10:20 AM


All times are GMT -8. The time now is 03:03 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.