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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-05-2003, 01:57 AM   #1
4Pics
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
4Pics is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 02:16 AM   #2
jwerd
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
jwerd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 02:41 AM   #3
4Pics
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.
4Pics is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 03:12 AM   #4
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,576
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
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 03:31 AM   #5
Nightwork
Registered User
 
Join Date: Oct 2003
Posts: 61
Quote:
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.
That's what I think as well

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
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 10:29 AM   #6
4Pics
Confirmed User
 
Industry Role:
Join Date: Dec 2001
Posts: 7,952
Bump for anyone elses opinion
4Pics is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-05-2003, 10:41 AM   #7
Nightwork
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
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.