PDA

View Full Version : Indexing only one page using command line syntax


sigfy
05-05-2004, 02:03 AM
Hi,

In the admin interface we can update the index choosing one page at a time. I would like to do this using command line interface.

I tried this :
exec("/usr/local/bin/php -f /usr/local/data/www/phpdig-1.8.0/admin/spider.php http://www.mysite.com/myfolder/mypage.php > /usr/local/data/www/indexing.log &");
but then PHPDig indexes all the website.

It's for a news application, I want PHPDig to index this page and only this one automatically and in background mode each time the user adds a news.

I can't use cron job to do this.

Is there a way ?

Thanks for your help.

nematis
05-28-2004, 08:14 AM
for the moment, i've made a horrible fiddlediddle in the admin/spider.php that i renamed to spiderone.php
(if interested could send you the code... but i can't say that it look like a solution at all... it just works for the moment while finding a better solution)

... It was urgent to get it running.

did you find a 'clean' way of doing it?

I use phpDig to search a 5000 page dynamic website and i don't feal like respidering the hole site to pick up the few updates that will be made.


I guess it could be a good feature request to have something as a function that could be called to spider just one url

ex:

dig_spider ($url, $dig_level , $force )

so fiting $dig_level to 0 would force the spider to only spider that page.
$force : to force respidering the page eaven if not dued for revisit

it could comme with a function dig_delete($url) that could be very usefull in my case!!!


a big thanks to the phpDig team...
I think it's a great little engine... (searches the 5000 pages in less than 0.5s for 600 results) and one thing I realy like about it is the result array! works very well with the TinyButStrong template lib I use... and makes it so easy to integrate to a website...
I would love to help improve this tool...


Antony


(sorry my english spelling is so bad i'm french and i have little time to search a dictionnary...)