|  | Posted by gosha bine on 08/28/07 08:15 
On 27.08.2007 20:31 tedpottel@gmail.com wrote:> Hi
 > I'm trying to build a counter that will keep trach how many hits I got
 > and where they came from.  In my html pages I have a script of code
 > that loads in an image.  This image is a php file.  When this file
 > executes it adds one to the stack counter,
 >
 > The problem is that for the referring server, I alawyas get the server
 > that is hosting the web page that is calling my web page counter.  I'm
 > assuming its because this is the server that calls the php code on my
 > server.
 >
 > I have seen other companies do this, how do they do it????
 >
 
 They generate counter code with javascript, something like:
 
 <script>
 document.write("<img src=counter.php?ref=" + escape(document.referer) + ">")
 </script>
 
 Using javascript also allows you to gather other info like screen
 resolution, plugin versions etc.
 
 
 --
 gosha bine
 
 makrell ~ http://www.tagarga.com/blok/makrell
 php done right ;) http://code.google.com/p/pihipi
  Navigation: [Reply to this message] |