PHPBuilder - Who's Been Here



RSS Twitter
Snippets Networking

Who's Been Here

by: Volcano
|
April 14, 2005

Version: v1.0

Type: Full Script

Category: Networking

License: GNU General Public License

Description: This script displays IP infomation and possible geographical location (Thanks to Eric Shaffer) of the last visitor on your site to the current visitor of your site. A cool and unique little script.



<?

// Who's Been Here? v1.0
// by Webboy (Drop-D)
// email: sorry, decided not to give this.
// You can use this script for any purpose.
// Promote open source code!

$fp = fopen("ipinfo.txt","r");
$ippost = fread($fp,15);
fclose($fp);
$name = gethostbyaddr($ippost);
echo '<center><font color="#000000"><b>The visitor before you was from:</b></font><br><font
color=red><b><a href="http://cello.cs.uiuc.edu/cgi-bin/slamm/ip2ll/index.html?name=
'.$ippost. '">'.$ippost.'</a></b></font><font color="#000000"><b>
(' .$name.')</b></font>';
$ip = getenv("REMOTE_ADDR");
$fp = fopen("ipinfo.txt","w");
fwrite($fp,$ip);
fclose($fp);
?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Volcano

Comment:



Comment:

(Maximum characters: 1200). You have characters left.