PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 05-14-2006, 11:06 PM   #1
shockfreezer
Green Mole
 
Join Date: Oct 2005
Location: Switzerland
Posts: 6
Little fix: Message on unathorized spider attempt

Hi there,

in the last days I was a little fighting with phpDig 1.8.9 RC1
I've found out that no message is displayed if phpDig is unauthorized to spider a site.
Because of this behavior I lost some time, ok also because of my bad capacity for remembering I really had forgotten that we had secured our server with .htaccess.
And I was wondering why phpDig can't spider our site....
So now i had written a little fix that helps prevent things like that. It displays a message if phpDig is unauthorized to spider a site. You have just to replace some code in the file admin/spider.php.
Go to line 511 in the file admin/spider.php.
Replace following code:
PHP Code:
else {
 
$ok_for_index 1;
 if (
$content_type == 'HTML') {
      
$ok_for_spider 1;
 }

with this code:

PHP Code:
   else {
     
$ok_for_index 1;
     if(
$content_type == "UNAUTH"){
        
//print phpdigMsg('not_authorized_toindex').$br;
        
print "<strong>You're unauthorized to spider this site:</strong>".$br;
     }
     if (
$content_type == 'HTML') {
          
$ok_for_spider 1;
     }
   } 
Sure it's quick and dirty, especially the part without localisation, but it's a workaround for the moment. An implementation in RC2, including the localisation wouldn't be to hard

That's it, I hope I can someone save some time with this code

Greez
shockfreezer
shockfreezer is offline   Reply With Quote
Reply


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
Message for Rispbiz jerrywin5 The Mole Hole 0 03-08-2005 09:30 AM
Hmm... a message from indonesia wawan.wira The Mole Hole 5 10-02-2004 05:53 PM
Error message -GO- How-to Forum 2 08-19-2004 11:13 PM
Welcome message in template claudiomet How-to Forum 3 08-17-2004 02:58 PM
changing the results message. jive How-to Forum 1 11-05-2003 11:36 AM


All times are GMT -8. The time now is 09:24 AM.


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