Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
gotcha
Regular
Regular



Joined: Mar 14, 2005
Posts: 91

PostPosted: Sun Apr 03, 2005 10:56 pm Reply with quote

I noticed that counter.php is counting yahoo's spider as a user with a netscape browser. The reason is, is it sees mozilla in the user agent and counts it as netscape and moves on without checking if it is a spider.

Here is the fix...
Open includes/counter.php

Find...

Code:


/* Get the Browser data */

if((ereg("Nav", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Gold", $_SERVER["HTTP_USER_AGENT"])) || (ereg("X11", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Mozilla", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Netscape", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"]) AND (!ereg("Konqueror", $_SERVER["HTTP_USER_AGENT"])) $browser = "Netscape";


Change to...

Code:


/* Get the Browser data */

if((ereg("Nav", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Gold", $_SERVER["HTTP_USER_AGENT"])) || (ereg("X11", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Mozilla", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Netscape", $_SERVER["HTTP_USER_AGENT"])) AND (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"]) AND (!ereg("Konqueror", $_SERVER["HTTP_USER_AGENT"])) AND (!eregi("Yahoo", $_SERVER["HTTP_USER_AGENT"])))) $browser = "Netscape";


I added AND (!eregi("Yahoo", $_SERVER["HTTP_USER_AGENT"]))

This will keep the yahoo spider from being counted as netscape and start being counted as a search engine

Original Post
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Apr 04, 2005 8:08 am Reply with quote

Thanks for this! Just visited your new site and intend to check out your code offerings. They look like they will be valuable additions to the community!
 
View user's profile Send private message
gotcha







PostPosted: Tue Apr 12, 2005 12:37 pm Reply with quote

So what do you think the chances of FB fixing this for the next version of nuke are?
 
Raven







PostPosted: Tue Apr 12, 2005 7:13 pm Reply with quote

ROTFL
 
gotcha







PostPosted: Tue Apr 12, 2005 9:28 pm Reply with quote

Bang Head
 
Raven







PostPosted: Tue Apr 12, 2005 9:32 pm Reply with quote

Send chatserv a PM and reference this post and ask him to include it in his next fixpack.
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Thu Apr 14, 2005 10:43 am Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message Visit poster's website
gotcha







PostPosted: Fri Apr 15, 2005 9:19 pm Reply with quote

nice Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©