• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

how can i modify this script so it doesnt count my hits?

something like this :
PHP:
$ip = array("127.0.0.1","111.111.111") ;
you can put there as many as you want...just dont forget to use "some ip number" and then ,
 
Warning: Wrong parameter count for in_array() in /home/is0lized/public_html/bot.php on line 5

PHP:
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr> <td><br><br><div align="center">
<?$ip = array("127.0.0.1","12.230.*.*");
$ipn = getenv("REMOTE_ADDR");
if(in_array($ipn))
{
include("counter.inc");
exit();
}
else
{
$file = fopen("count.inc","r+"); 
$count = fread($file, filesize("count.inc")); 
fclose($file); 
$count += 1; 
$file = fopen("count.inc","w+"); 
fputs($file, $count); 
fclose($file); 
include("count.inc");
}?> page views since  Sat. Jan 4th 2002

i blocked out my ip with * for security reasons

im going to need to learn php instead of being a script kiddie
 
Last edited:
sorry, its me again :biggrin2:
change this :
PHP:
if(in_array($ipn))
to this :
PHP:
if(in_array($ipn, $ip))
and yea, you should learn PHP !
 
it works now, but for some reason it wont show me anything after the php

PHP:
<table width="96%" border="0" cellspacing="0" cellpadding="0">
  <tr> <td><br><br><div align="center">
<?$ip = array("127.0.0.1","12.230.*.*");
$ipn = getenv("REMOTE_ADDR");
if(in_array($ipn, $ip))
{
include("count.inc");
exit();
}
else
{
$file = fopen("count.inc","r+"); 
$count = fread($file, filesize("count.inc")); 
fclose($file); 
$count += 1; 
$file = fopen("count.inc","w+"); 
fputs($file, $count); 
fclose($file); 
include("count.inc");
}?> page views since  Sat. Jan 4th 2002<BR>© 2001 Is0lized Industries. All Rights Reserved. Examine the source code if you want, but don't just blatantly steal it. Also See <A href="legal.html">Legal</A></div></td></tr></table>

only shows me the number not the copyright / legal
 
Last edited:
w00t w00t


it works :)

thanks for the help... i changed the ip addy in my bot.php to make sure it didnt not count everyone else :)
 
Back
Top