Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Steptoe
Involved
Involved


Joined: Oct 09, 2004
Posts: 293

PostPosted: Wed Oct 12, 2005 4:38 pm Reply with quote

My user info is showing and ///// google bot
I found a bit od code somewhere that was meant to stop //////
Also added an extra line for google (see note is code)
Trouble is it doesnt work. how do I do this and what is the code in simple explanation
Quote:
/Creating SQL parameter
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount = $row[userCount];
$sql = "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$userCount2 = $row[userCount];
///changed below line to stop record inlsearch appearing...Doesnt seem to work thu??
////$guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest=1"));
///to
$guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1' AND host_addr NOT REGEXP '^68[.]142[.]*[.]*'"));
///added line to stop record google bot
$guest_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest='1' AND host_addr NOT REGEXP '^66[.]429[.]*[.]*'"));

$member_online_num = $db->sql_numrows($db->sql_query("SELECT uname FROM ".$prefix."_session WHERE guest=0"));
$pmi=($member_online_num/$who_online_num)*100; $pmi = number_format($pmi, 0);
$pvi=($guest_online_num/$who_online_num)*100; $pvi = number_format($pvi, 0);

Cheers
Steps

_________________
My Spelling is NOT incorrect, it's Creative 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Wed Oct 12, 2005 5:29 pm Reply with quote

Do you have Disallow: /blocks/ in your robots.txt file?
 
View user's profile Send private message
Steptoe
PostPosted: Wed Oct 12, 2005 7:02 pm Reply with quote

yes
Disallow: /blocks/
I just stop them showing in the user info.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©