3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by maryparker
0

Yes, the codes for 301 & 307 are right.

To track unique and total clicks on a link in PHP, you can try this:

Mysql:

CREATE TABLE ip (ip VARCHAR(255) NOT NULL);

$ip = $_SERVER;
// connect to db
$query = mysql_query("SELECT * FROM ip WHERE ip='$ip';");
$result = mysql_fetch_array($query);
if (isset($result[ip]) || $result[ip] != $ip){
mysql_query("INSERT INTO ip (ip) VALUES ('$ip');");
}

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.