|
07-17-2004, 12:49 PM | #1 |
Green Mole
Join Date: May 2004
Posts: 9
|
custom depth of search per site in cgi (including urllist)
Hi,
since I use phpdig to spider several sites I wanted it to be possible to give a custom search depth per site in a urllist when spidering with a cron job. So I made a few modifications to spider.php and robot_functions.php. Thought this might be usefull for some off you, so I like to share it with you IMPORTANT: modifications are made for version 1.8.3! You need to add an extra column (site_limit) is to the table sites in the phpdig database sites ALTER TABLE PREFIXsites ADD site_limit SMALLINT( 6 ) ; ------------------------------------------------------------------------------ example of list.txt Code:
http://www.site1.com 2 http://www.site2.com 0 http://www.site3.com http://www.site4.com 5 shell command: Code:
#php -f [PHPDIG_DIR]/admin/spider.php list.txt site2.com and site3.com will use the default value as specified in the config.php file site4.com will be spidered with a depth of 2 It can also be used to spider a single site shell command: Code:
#php -f [PHPDIG_DIR]/admin/spider.php http://host.mydomain.com depth Code:
#php -f [PHPDIG_DIR]/admin/spider.php http://host.mydomain.com 5 Code:
#php -f [PHPDIG_DIR]/admin/spider.php http://host.mydomain.com Code:
#php -f [PHPDIG_DIR]/admin/spider.php http://host.mydomain.com 0
__________________
Grefix |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help including search.php | dhoyos | Troubleshooting | 2 | 02-02-2007 01:53 PM |
Search Depth using cron | hpg4815 | How-to Forum | 1 | 10-02-2006 10:16 AM |
Changing the search depth | Brain | How-to Forum | 1 | 03-17-2004 04:34 AM |
Search Depth using PhpDig with command line | bazarin | How-to Forum | 1 | 02-20-2004 07:53 AM |
Add search depth limit to the sites table | peter | Mod Requests | 0 | 01-03-2004 10:14 PM |