View Single Post
Old 10-25-2010, 03:39 AM  
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,793
You could do something simple like

Code:
<script language="Javascript" type="text/javascript">
<!--
var docRef = document.referrer
docRef = encodeURIComponent(docRef) //URI encode the referrer string
dummyPhpImg = new Image
dummyPhpImg.src = '/yourserversidescript.php?REF=' + docRef
//-->
</script>
Basically loads a dummy image object which is actually your php script, don't forget to send a header response as an img file at the of the script, it can be an empty 1x1 pixel image, doesn't matter as you're not going to display it. BTW you can add more parameters to the query string such as screen size, client time, etc.
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote