You are here: Re: Help in trying to make a web page counter « PHP Programming Language « IT news, forums, messages
Re: Help in trying to make a web page counter

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация