English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Does anyone know how to set up bebo so you can see whos been viewing your page? I know it can definitely be done but I just don't know how! I would like an invisible thing so that people don't know you are tracking, like no javascript codes that have to be posted. Appreciate your help, thanks!

2007-05-16 00:03:18 · 3 answers · asked by Fiona A 2 in Computers & Internet Programming & Design

3 answers

dont know but it would be great if it can be done, sorry i can not help. good luck,

2007-05-16 00:14:35 · answer #1 · answered by mamgu....... 6 · 0 0

If your server has PhP enabled and a data-base (i.e. MySQL), it is easy:
Create a database table in MySQL with the fields
ip varchar(20), host varchar(50), page varchar(25), date varchar(25). Call the table "visits".

On each page you want to track, put this in the body:
$page = "name_of_the_page";
include ("getdetails.php");
?>

Write a small php file (say "getdetails.php");
$ip = GetHostByName($REMOTE_ADDR);
$host = @getHostByAddr( $ip );
$ip_number = sprintf("%u", ip2long($ip));
$dat = date ('Y-m-d H:i:s');
$dotted_ip_address = long2ip($ip_number);
// Connect to database
$link = mysql_connect("localhost", "username", "password") or die(" Could not connect : " . mysql_error());
mysql_select_db("dbname") or die("Could not select database");
$sql = "INSERT INTO `visits` ( `ip` , `host` , `page` , `date`)
VALUES ( '" . $ip . "','" . $host . "','" . $page . "','" . $dat . "' )";
$result = mysql_query($sql) or die("Query failed : " . mysql_error());
mysql_close($link);
?>

Finally, write a small php file to check the contents of the DB when you want to.

Nothing will be visible to the users, since the code in PhP does not echo anything on the HTML file.

Good luck

2007-05-16 22:47:22 · answer #2 · answered by just "JR" 7 · 1 0

Would be great...but I don't think it can be done.

There is a Myspace tracker though.

2007-05-16 00:33:27 · answer #3 · answered by penelope pitstop 5 · 0 0

fedest.com, questions and answers