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 12-22-2009, 10:59 PM   #1
goldfish
Confirmed User
 
goldfish's Avatar
 
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!
goldfish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:05 PM   #2
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
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");
}
__________________

Last edited by GrouchyAdmin; 12-22-2009 at 11:07 PM..
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:12 PM   #3
cyco_cc
Confirmed User
 
cyco_cc's Avatar
 
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.
cyco_cc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:15 PM   #4
goldfish
Confirmed User
 
goldfish's Avatar
 
Join Date: Jan 2009
Location: Somewhere east of the Mississippi
Posts: 723
Quote:
Originally Posted by GrouchyAdmin View Post
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");
}
and thats where the problem lies, if I destroy the session they can get to more content, right?

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!

Last edited by goldfish; 12-22-2009 at 11:19 PM..
goldfish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:18 PM   #5
cyco_cc
Confirmed User
 
cyco_cc's Avatar
 
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.
cyco_cc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:26 PM   #6
goldfish
Confirmed User
 
goldfish's Avatar
 
Join Date: Jan 2009
Location: Somewhere east of the Mississippi
Posts: 723
Quote:
Originally Posted by cyco_cc View Post
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.
that might actually work, I am already logging their ip for something else
__________________
ICQ: 566990329

"There is no rest for the wicked... and porn purveyors!
goldfish is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2009, 11:47 PM   #7
Killswitch - BANNED FOR LIFE
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.
  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.