 <p>this goes in head (ajax request)</p> <pre><code>&lt;script type="text/javascript"&gt; function clickLog(str) { if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","click-log.php?url="+str,true); xmlhttp.send(); } &lt;/script&gt; </code></pre> <p>this opens 'click-log.php' with url parameter 'str' &lt;&lt;&lt; 'str' is defined as 'this.href' in the onclick function brackets</p> <pre><code>&lt;a href=" { url } / file .swf " onClick="clickLog(this.href)"&gt;Click Me&lt;/a&gt; </code></pre> <p>when the link is clicked it opens and processes the php file, with the link href (this.href) as the parameter url=</p> <p>the script even came with this.....</p> <pre><code>&lt;div id="txtHint"&gt;&lt;/div&gt; </code></pre> <p>if you place this div below the link to be clicked, it will echo whatever the click-log.php outputs......</p> <p>this will be explained below....</p> <p>this is my php file</p> <pre><code>&lt;?php $url = $_GET['url']; $time = date('U'); $ip = $_SERVER['REMOTE_ADDR']; $fp = fopen('click-log.txt', 'a'); $fwrite = fwrite($fp, $time.' , '.$ip.' , '.$url.' '); // --- echo 'Log Written'; --- // ?&gt; </code></pre> <p>this writes to end of text file 'click-log.txt' with the timestamp, ip, and href of link clicked</p> <p>the echo line that is commented out, will insert the text "Log Written" into the "txtHint" div once the link has been clicked and the ajax request processed</p> <p>all files used are in the base directory however anyone who would like to implement this script on their site would probably already know how to change file locations etc</p> <p>....</p> <p>..... thanks for the info guys.... another successful script :)</p> <p>ps, now to write the script to show me the logfile in pretty graphs and pie charts :lmao:</p>