Thursday, November 19, 2009

Bebo - tracking who views your page??

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!

Bebo - tracking who views your page??
dont know but it would be great if it can be done, sorry i can not help. good luck,
Reply: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:


%26lt;?php


$page = "name_of_the_page";


include ("getdetails.php");


?%26gt;





Write a small php file (say "getdetails.php");


%26lt;?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);


?%26gt;





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
Reply:Would be great...but I don't think it can be done.





There is a Myspace tracker though.


No comments:

Post a Comment