Veto
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by Veto
-
-
hey all.. i am new here n to the forum as well... hope you guys can help me here :P
i was wondering, if it is possible to code with PHP, to make a counter script which track unique visitors clicked on a link. and once the link has been unique-clicked on the 100th time, the script will then open up a page to collect the visitors information to give them prize or something like that :)
im sure this will be complicated n thus hope you guys can help :)
thanks in advance
Veto
100th click script?
in PHP Coding Help
Posted
Hi,
You will need to write the IP addresses to a table / file somewhere so that each new click, you know is unique or not.
On your checking page, you will need to query that with "select count(*) from TABLE_NAME where ipaddress = 'WHATEVER'" if it returns a count higher than 0, you know its not unique.
You can then add the IPADDRESS to the table. then "SELECT count(*) from TABLE_NAME" and if it equals 100... Hooray! Lucky them for wining a random internet prize...
Dave
[/quote]
thanks for the reply dave.
a few questions regarding ur post above :
1. is there anyway for me not to input the ip addresses manually? like getting it automatically on the first time the user visits the page without him knowing any of this (asking for him to fill in n stuff)?
2. is this all possible using php alone? if it is, can u point me to the correct path on making this script? like which syntax to use, any webites that teach me how to do it aor something like that due to the fact this is my FIRST attempt on php :(
thanks!