can anyone tell me code for these lol i know theve been posted alot
Users Online:
Ip address:
Date:
Time:
Hosting company: like server 80 execulink
any other ones that are statistics'
can anyone tell me code for these lol i know theve been posted alot
Users Online:
Ip address:
Date:
Time:
Hosting company: like server 80 execulink
any other ones that are statistics'
Originally Posted by bananasislegend
this thread might be better than sex..
I think xEnigma.co.uk has a tutorial on this.
I'll probably make one, check my PHP tutorial 1 for IP adress
- Dan
thanx dan
Originally Posted by bananasislegend
this thread might be better than sex..
No problem dude, Did they have one?
- Dan
I can't write you a script for show users online, as it would be pretty big.
But this might work for the other stuff:
PHP Code:<?php
$ip = $_SERVER['REMOTE_ADDR']; //Gets IP
$date = date("d,M,y"); //Gets date
$time = date("G:i:s"); //Gets time
echo "Your IP address is $ip<br />"; //Puts the users IP on the page
echo "The date is $date<br />"; //Puts the date on the page
echo "The time is $time"; //Puts the time on the page
?>
kinda quit.
no idea i tried to go there but cannot find server whats link to url tutorial?
nets does that print to same page?
lol nvm i got it
- Colin
lol how i get the users internet provider?
Originally Posted by bananasislegend
this thread might be better than sex..
Dunno,
Looks like the server is down "/
- Dan
What are you asking for exactly? If you put that in a document with a PHP extention (and your host supports PHP) then it will put on the page you placed it on the date, time and IP address of the user.
kinda quit.
Ok.
Create a .PHP file called onlinepeople.php
Put the following code in it.
The create a .txt file called log.txtPHP Code:
$remote = $_SERVER["REMOTE_ADDR"];
$file = "log.txt"
;
$timeoutsecs = 30;
$timestamp = time();
$timeout = ($timestamp-$timeoutsecs);
$fp = fopen("$file", "a+");
$write = $remote."||".$timestamp."n";
fwrite($fp, $write);
fclose($fp);
$online_array = array();
$file_array = file($file);
foreach($file_array as $newdata){
list($ip, $time) = explode("||", $newdata);
if($time >= $timeout){
array_push($online_array, $ip);
}
}
$online_array = array_unique($online_array);
$online = count($online_array);
if ($online == "1") {
echo "People Online: $online";
} else {
echo "People Online: $online";
}
?>
Put it into the same directory as your other file and CHMOD log.txt to 777
Thats shows how many people online.
- Dan
lol ok thanx guy u know on sirting sites if u go on it say
Provider (example like Execulink server 6)
thanx again dan
- Colin
Originally Posted by bananasislegend
this thread might be better than sex..
Want to hide these adverts? Register an account for free!