|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
More php help needed :)
I want to log clicks on a exit console as such
http://www.blah.com/out.php?id=1 http://www.blah.com/out.php?id=2 http://www.blah.com/out.php?id=3 http://www.blah.com/out.php?id=4 http://www.blah.com/out.php?id=5 The 2 ways I can log hits are either use cookies, or log the ip address and if its not used in last 1-24hrs then count it as a unique. If I am using cookies, how do I store it so I know what links are unique for them the easiest way? Like <? if (!isset($_COOKIE['$id']) ) { add click for id setcookieforid } ?> Is there a short way to store the id's? or will the cookie file be huge if I have like 500 id's they could click? Thanks |
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
|
Well, from the code shown you will be creating a new cookie for each entry... so that will be like 500 cookies with a value in each of them.. the problem with this is most comptuers will only receive 1 cookie per connection (URL) so ... that can turn into a problem... I'd just log the IP, and have it clear out daily... that is your best bet... store the ips in a database and then if it is the next day, it checks, and if it is, resets the ip address log and adds the value simple as that
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com |
|
|
|
|
|
#3 |
|
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
It doesn't create a new cookie if one already exists for that domain. It just adds a the cookie variable.
or atleast that is how it works with IE6. |
|
|
|
|
|
#4 |
|
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,580
|
best way would be to create a mysql database and store the values in there. and go from there. its pretty much easy from there.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates |
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Oct 2003
Posts: 61
|
Quote:
If you want to go with the cookie, store the data in an array...
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442 |
|
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Dec 2001
Posts: 7,952
|
Bump for anyone elses opinion
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Oct 2003
Posts: 61
|
you got mine opinion, where the hell do you need some more for ;)
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442 |
|
|
|