homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Need programming help based on PHP
Need programming help based on PHP

Msg#: 4499229 posted 8:24 am on Sep 24, 2012 (gmt 0)


I am trying to develop a simple PHP application with quite a 2 hour free trial for my application. I need the account to deactivate after 2 hour. Donít know how to do and I also want multiple IP protection on single user

Thanks in Advance



Msg#: 4499229 posted 10:05 am on Sep 24, 2012 (gmt 0)

So you have an application and want to give 2 hour trial to anyone?

I would do it via registration. But unless you use Facebook, or similar profile to sign in, you can never be sure that one person will register multiple times. (Even with facebook, this isn't sure, there are lot of fake profiles).

Or, you can force users to fill bigger amount of personal data. But still, they can use fake data. And you have to protect and work with their personal data according to laws in your country.


Msg#: 4499229 posted 10:34 am on Sep 24, 2012 (gmt 0)

Assuming you have a registration page, you can send them an email with a link containing a unique id as a parameter - normally I use the record id from my users table.
This way you can be reasonably sure that the email address is valid.
You will also need a "downloaded" field in the users table that is defaulted to 0.
When the link in the email is clicked, it goes to a page that has a look if the id exists and what the value in "downloaded" is.
If it is "0" then update it to "1", drop a cookie that expires in 2 hours and redirect them to your application page. (the application page must only allow users in that have an unexpired cookie otherwise it must redirect to the "buy" page)
If "downloaded" is "1", redirect to the application page. If it is someone else then there will not be a cookie and he will be redirected to the "buy" page.
If he forwards the email to his buddy and his buddy clicks the link first, his buddy gets the usage and he gets the "buy" page - if he clicks first, his buddy gets the "buy" page.
Good luck - hope its profitable for you.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved