PDA

View Full Version : Help please ;-)



Steven.
04-08-2005, 09:43 PM
Hi Guys 'N' Gals :)

okey, with my site i need the code which i think is PHP for;

- HitCounter - Not image just text!
- Users Online
- IP addy
- Users Browser

+ Rep to the first person who posts teh code's :p

Thanks.

Ste :)

:Woof
04-08-2005, 09:50 PM
I'll be evil here xD

google it

[ Edit ; Here You Go :
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$service = $_SERVER['HTTP_USER_AGENT'];
$time = date("F d, y @ g:i:s A", time());

echo "Your I.P is: $ip<br>Your Internet Service is: $service<br>The current time is: $time";
?>

Has Ip, Internet Service, And Time


<?php

$loadbegintime = microtime();
$loadbeginarray = explode(" ", $loadbegintime);
$loadbegintime = $loadbeginarray[1] + $loadbeginarray[0];

$loadendtime = microtime();
$loadendarray = explode(" ", $loadendtime);
$loadendtime = $loadendarray[1] + $loadendarray[0];

$total_script_time = $loadendtime - $loadbegintime;

echo "This Page took " .round($total_script_time , 6) ." seconds to load!";

?>


Displays The Loading Time Of Page :)



?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
Displays The Browser On Its Own :)


<?php
$counterfile = "counter.txt";
$counter = file("$counterfile");
$c = $counter[0];
if (strlen($c) == 0)
{$c=0;}
$c=$c+1;
$a = fopen("$counterfile", "w");
fwrite($a, $counter = "");
fputs($a, $c);
fclose($a);
echo ("$c");
?>
This is a flat type counter its done via a file made in notepad :o make a file called counter.txt and chmodi t '666' copy that code were you want the hit counter to be. simple but boring way and to easy.

Steven.
04-08-2005, 10:39 PM
o.O well i suppose that helps, i need the hits and users online badlt though lololol anyways Rep :) still looking though kthxbi

BlueTails
04-08-2005, 10:44 PM
I Looked At It, Too Hard Vego Stev

:Woof
04-08-2005, 10:56 PM
May not be the smallest codes ever but they should work :)

BlueTails
04-08-2005, 11:06 PM
Ya It Should

Owen
04-08-2005, 11:26 PM
users online:
<SCRIPT
src="http://fastonlineusers.com/online.php?d=WWW.YOURSITE.COM"> </SCRIPT>
Browser:
<!--#echo var="HTTP_USER_AGENT" -->
Text counter: http://www.cutandpastescripts.com

There all html just incase..

Steven.
05-08-2005, 02:20 AM
Thanks Owen :) + Rep. - EDIT: - Darn it, must spead some :p i will add it to my to do list :p thanks rep will come soon.

Thread Locked

Want to hide these adverts? Register an account for free!