![]() |
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? |
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(); |
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.
|
Quote:
I could put the seesion destroy inside the members area but that still leaves a bunch open |
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. |
Quote:
|
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.
|
All times are GMT -7. The time now is 11:26 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123