View Single Post
Old 05-23-2008, 10:48 PM  
Goodings Media
Confirmed User
 
Goodings Media's Avatar
 
Join Date: Apr 2007
Location: UK
Posts: 1,987
hey,


this is something rough n ready, make it more robust as you need to

PHP Code:
<?php
/***** Link tracker*******
Track hits using ....out.php?out=http://yourtradepartner.com

************************/

if(isset($_GET['out'])){
        
mysql_query("UPDATE tracker SET hitsout=hitsout+1, hitsout_today=hitsout_today+1 WHERE link='" $_GET['out'] . "'");    
        
header('Location: ' $_GET['out']);
?>
build a table in your database called 'tracker' with fields 'id', 'hitsout', 'hitsout_today', 'link'

run a cron job with a seperate script each day that sets all 'hitsout_today'=0

make link the URL of your trade partners. To standardize and simplify the script, always use the form http://partner.com

So, to use....

http://www.yourwebsite.com/out.php?o...p://google.com

Hope that helps
__________________
ICQ: 446-568-913 Email: liam||goodingsmedia.com msn: [email protected]
Goodings Media is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook