I want to use a tracker on my website… essentially i want to be able to see which ip’s are accessing the website and when. anyone use any products that they can recommend?
this is a website that i just want to put come pictures on… i want to see who is accessing the files.
are you running the web server? if not and they don’t allow you to install any stat app’s, you can use google analytics, it’s free
i’ve used this on another site that I have… but i want to know when and the ip… not just from which location… . can google analytics do this?
no, webserver is someplace else
just use php with a sql table to catch and log all of the ip’s and at what time. Assign each individual session a line on the table and track their movements through the site.
wayyyy too much for me to try and figure out… any easy solutions?
try this
mysql
CREATE TABLE `myVisitors`.`myVisits` (
`ip` BIGINT NOT NULL ,
`visits` INT UNSIGNED NOT NULL ,
`visitTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
UNIQUE (
`ip`
)
) ENGINE = MEMORY
php
<?php
$dbHost = 'localhost'; // database host
$dbName = 'myVisitors'; // database name
$dbUN = 'dbUN'; // database user name
$dbPW = 'dbPW'; // database password
$ip = ip2long($_SERVER['REMOTE_ADDR']);
$dbcon = mysql_pconnect($dbHost,$dbUN,$dbPW)
$sql = 'INSERT INTO ' . $dbName . '.myVisits SET ip=\'' . $ip . '\' ON DUPLICATE KEY visits=visits+1;';
$DBQ = mysql_query($sql);
echo (!$DBQ) ? "Error with adding IP. <br/> Error:" . mysql_error() : "Added IP";
mysql_close();
?>
where do i put that stuff?? in the index.htm
im not a programmer…
fist run the MySQL Query string inside the mysql server if you have it
then put that code in a index.php file on the top.
It will create a memory table for scalability.
The memory will not always be there for example if you reboot it will be gone.
So to save the memory simply create a cron script to pull the data and insert into another table with the same schema but non memory type.
how about when i set up the site, you just log in and do this for me?
sweet. deal. rubricant, but this man a taco.