ID: 520
Viewed: 4839
Added: Nov 12, 2003
Version: 1.0
Snippet uploaded by: Martyn Coupland
Written By: DA Master
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
This simple link trackers works well with sites that have affiliate links.
<!---Head--->
none
<!---Body--->
<?php
/*
mcHits Version 1.0
Filename: out.php
Created: 12th November 2003
Insert the sql code below into phpMyAdmin:
CREATE TABLE `mc_hits` (
`id` int(11) NOT NULL auto_increment,
`url` text NOT NULL,
`count` bigint(20) NOT NULL default '0',
KEY `id` (`id`)
) TYPE=MyISAM;
*/
/* Start User Editing */
$db[0] = "localhost";
$db[1] = "use\r\name";
$db[2] = "password";
$db[3] = "dataname";
/* End User Editing */
mysql_connect($db[0],$db[1],$db[2]);
or die(Cannot Connect To Database: mysql_er\r\no());
mysql_select_db($db[3]);
or die(Cannot Select: $db[3] from $db[0]);
$result = mysql_query("SELECT * from mc_hits WHERE url='$url'");
while($res=mysql_fetch_array($result))
{
$id = $res["id"];
$count = $res["count"];
$url = $res["url"];
$count++;
$update = "UPDATE mc_hits SET count='$count' WHERE id=$id";
$updatesql = mysql_query($update");
?>
<script language="javascript">
document.location.href="<?php echo $url; ?>"
</script>
<?php } ?>
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.