PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-28-2003, 01:11 PM   #1
ZAP
Green Mole
 
Join Date: Nov 2003
Posts: 7
reindex specific PHP page on change?

Hello -

Great script!

Our site has some pages with articles that users can comment on. The comments are added to a text file and then included at the bottom of the page using a simple PHP include statement. phpDig is able to index these comments with no problem.

What I would ideally like to do is to add a line to my PHP comment script that would make phpDig reindex just that page after adding the new comment. I realize that I could call the spider script after adding the comment, but how can I specify the specific URL and keep phpDig from spidering all the other links? I want to keep my search index up-to-date, but I don't want to tax the server unnecessarily.

THANKS in advance for your response.
ZAP is offline   Reply With Quote
Old 11-28-2003, 04:56 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Maybe try something like the following:
PHP Code:
// edit to fit your OS and script
if ($_POST['is_new_comment'] == "yes it is") {
$comment_page "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$comment_page escapeshellcmd($comment_page);
$the_command "php -f [PHPDIG_DIR]/admin/spider.php ".$comment_page;
exec($the_command);
}

/* set the following in config.php
define('SPIDER_MAX_LIMIT',0);
define('SPIDER_DEFAULT_LIMIT',0);
define('RESPIDER_LIMIT',0);
*/ 
__________________
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
Old 11-28-2003, 06:35 PM   #3
ZAP
Green Mole
 
Join Date: Nov 2003
Posts: 7
RE: reindex specific PHP page on change?

Thanks! I'll give it a try in a day or so and let you know how it turned out. I think I'll probably add a flag to spider.php to make it only reindex that one page rather than setting it in the config file (since at other times I'll want it to spider).
ZAP 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
start reindex not from the web page george222 How-to Forum 0 12-11-2007 05:26 AM
Creating a second search page in the same site searching only a specific path Jorik How-to Forum 2 02-09-2005 05:06 AM
Targeting a specific part of the page cyrax78 Mod Requests 2 02-07-2005 07:40 PM
No summary and cant reindex alan-s Troubleshooting 3 12-11-2004 11:01 AM
Returning from a html page to a php page. rafarspd How-to Forum 2 12-04-2003 03:23 AM


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


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