The only way that comes to mind is to use cookies ... when ur link is clicked on on ur referrers website as cookie should be created and stored on the users system. then when they reach ur index.php page or whatever page you want you read the cookie and right to your database where they came from based on the value of the cookie ... These are just my thoughts .... anyone else have any good ideas??