![]() |
![]() |
![]() |
||||
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
Join Date: Jan 2009
Location: Somewhere east of the Mississippi
Posts: 723
|
Any php coders around?
Here's what I want to do.
First click to video, every subsequent click after that goes to join form. Would a simple session script work? start_session(); session_register("clicks") if ($clicks > 1){ header ("Location: join form"); } any downfalls of doing it this way? any way someone could get around it?
__________________
ICQ: 566990329 "There is no rest for the wicked... and porn purveyors! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
You can fill up your session dir and/or have issues with cookies. Remember to destroy your session somewhere, too, and setup a cleanup crontab.
That's ugly, but it'll likely do what you want. Code:
@start_session(); $_SESSION['clicks'] = (isset($_SESSION['clicks'])) ? (int)$_SESSION['clicks']+1 : 1; if ($_SESSION['clicks'] > 1){ header ("location: join form"); }
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Oct 2008
Posts: 344
|
I second what Grouchy says. You could destroy the session on the join page because at that point, presumably, you don't care about the session value.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Jan 2009
Location: Somewhere east of the Mississippi
Posts: 723
|
Quote:
I could put the seesion destroy inside the members area but that still leaves a bunch open
__________________
ICQ: 566990329 "There is no rest for the wicked... and porn purveyors! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Oct 2008
Posts: 344
|
Yes, of course they can. So, log the IP of the user and the date of the access. Make that check on page load, if they've accessed content in the last 24 hours (or whatever) redirect them to the join page.
Note, at that point, the SQL query can do cleanup on the log or you can set up cron job to do it. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jan 2009
Location: Somewhere east of the Mississippi
Posts: 723
|
Quote:
__________________
ICQ: 566990329 "There is no rest for the wicked... and porn purveyors! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Guest
Posts: n/a
|
Just put a new field in the database for the ip logging to reflect the views, and that way no matter what, that user comes back they will get sent to the join form.
|
![]() ![]() ![]() ![]() ![]() |