PhpDig.net

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

Reply
 
Thread Tools
Old 04-07-2005, 02:22 PM   #1
boyd
Green Mole
 
Join Date: Apr 2005
Posts: 9
update only changed files

Ver 1.8.7

Indexed the site ok, only using one site.

when I change a couple of pages in a dir, and then go re-index that dir only (update frame green arrow) it re-indexes every page even if only one has changed, is this the expected behavior? As it records dates I presumed it would only both with changed files. Can I make it only index changed files?

Thanks,
B.
boyd is offline   Reply With Quote
Old 04-07-2005, 02:30 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Click a blue arrow and then click a green check mark on the right hand side. If you click a green check mark on the left hand side, PhpDig will reindex the pages shown when you click the blue arrow. Note that PhpDig only undates what is already there. If you add links to a page, and want to index those new links, use the textbox to reindex the page, setting the options under the textbox to your preference.
__________________
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 04-07-2005, 02:37 PM   #3
boyd
Green Mole
 
Join Date: Apr 2005
Posts: 9
ok i understand that thanks, but if i have changed 10 files in a directory of 500 am i going to have to either re-index 500 or select 10 one at a time?

and what about 20 files scattered around a 5000 page site? I want to re-index the 20 not the whole thing?

Thanks for the help. (worth at least twice the $5) :-)
boyd is offline   Reply With Quote
Old 04-08-2005, 07:26 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Code:
<?php

// purpose: link to files modified less than $secs seconds ago
// as-is, no warranty, as-is, no warranty, as-is, no warranty
// save this script at http://www.your-domain.com/name.php
// use PhpDig to index http://www.your-domain.com/name.php
// delete name.php from the PhpDig admin panel when index done
// tip: visit http://www.php.net/manual/en/function.opendir.php

/************* Start Configuration */

// 600 seconds is 10 minutes or use $secs = 10*60; // 10 minutes times 60 seconds

$secs = 600;                                    // seconds since last modification

// separate (partial) names in $avoid1, $avoid2, $avoid3, $avoid4 with | character

$avoid1 = ".|..";                               // avoid files that match with these
$avoid2 = "private|hidden";                     // avoid files that start with these
$avoid3 = "htaccess|htpasswd|jpg|gif|png";      // avoid files that end with these
$avoid4 = "robots|admin|install|include";       // avoid files that contain these

/************* End Configuration */

$base = basename($_SERVER['PHP_SELF']);
$avoid = "^($avoid1|$base)\$|^($avoid2)|($avoid3)\$|($avoid4)";
$dirs = array(".");

while (list($key,$dir) = each($dirs)) {
	if ($handle = opendir($dir)) {
	        while (false !== ($name = readdir($handle))) {
			$loc = substr($dir."/".$name,2);
	                if (!is_dir($loc) && !eregi($avoid,$name)) {
	                        if (filemtime($loc) > time() - $secs) {
	                                echo "<a href=\"$loc\">$loc</a><br>\n";
	                        }
	                }
			elseif (is_dir($loc) && !eregi($avoid,$name)) {
				$dirs[] = "./".$loc;
			}
	       	}
	        closedir($handle);
	}
}

?>
__________________
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 04-08-2005, 05:56 PM   #5
boyd
Green Mole
 
Join Date: Apr 2005
Posts: 9
Thanks for that, just one more problem when I enter the script page in the url box search follows all the links included in the files or only indexes the script file.

I want to it to just index the list of files in the script file and nothing else

I have tried various search links depth settings with out success. Can you assist?
boyd is offline   Reply With Quote
Old 04-08-2005, 10:44 PM   #6
boyd
Green Mole
 
Join Date: Apr 2005
Posts: 9
worked it out, wrote my own spider form to push the links i want changed in, thanks for the help
boyd 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
Index Only Changed or newly Added File alokjain9 How-to Forum 1 02-09-2006 05:21 AM
I cannot update my website humanitaire.ws How-to Forum 7 01-19-2005 09:00 AM
Update Problem Siava Troubleshooting 1 07-27-2004 12:06 PM
google changed algorithm heiko IPs, SEs, & UAs 1 03-29-2004 12:32 PM
Update Documentation Charter Feedback & News 6 01-19-2004 10:11 AM


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


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