Results 1 to 9 of 9

Thread: Not sure what this is called...

  1. #1
    Join Date
    Feb 2009
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Not sure what this is called...

    Hello,

    I'm not sure exactly what this is called but here's the deal:

    I need a page that "runs out" after the user views it. Basically, they are redirected to this page after they've payed, a username/password will generated there, and they will be registered to the site.

    My problem is, I can't have this page viewable by just anyone. I don't want them to be able to copy the URL and come back, or give it to their friends for free registration/access. I want the URL to "run out", so to speak.

    How can I go about doing this? I'm familiar with PHP but I'm only basic. I don't know anything on ASP or other web languages.

    Thanks to anyone that can help.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can have PHP set a session:
    Redirect page:
    Code:
    <?php
    session_start();
    //some how figure out if they're paying
    $_SESSION['payed'] = true;
    header('Location: paying.php');
    //end some how figure out if they're paying
    ?>
    Then on the paying page:
    Code:
    <?php
    session_start();
    if(isset($_SESSION['payed']) && $_SESSION['payed']){
      echo "You've payed!";
    }
    ?>
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    george- (02-15-2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hello Nile, thank you for replying so quickly.

    I'm not sure if I'm going to be able to do what you have suggested though. I am using PayPal as the payment method and the redirect and payment pages are not mine to edit.

    Is there any way I can use htaccess to allow only those who have come from PayPal to access the page? or is there a better method?

    I have attached a jpg which more accurately describes the process I need.

    Thank you.

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Hmm, on the page that your paying from, I think that paypal gives you the option to send POST data along with the thanks page, am I correct?
    Jeremy | jfein.net

  6. The Following User Says Thank You to Nile For This Useful Post:

    george- (02-15-2009)

  7. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Are you using a PayPal Merchant account? If so, you don't have to bother with any of this (unless you want to). PayPal takes care of it all for you.

    You should read more about instant payment notification (IPN). You might also find useful information at PayPal's IPN forum.

  8. #6
    Join Date
    Feb 2009
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile,

    I don't think that method will work as there are only a certain number of custom PayPal variables that can be posted. Would I be able to start a session from a POST?

    Is there any way I can achieve this:

    1. User enters thank you page.
    2. Username/Password generated (done this, with the help of Schmoopy)
    3. If user points to another page, coming back will cause "page has expired". Also if they press refresh it will have to expire.
    4. Hide/encrypt the URL so it can't be copied & pasted to other people.

    Sorry if I seem a little ignorant here , as I'm pretty sure the URL thing isn't as simple as I'm thinking, or the page expiration...

    Last edited by george-; 02-15-2009 at 11:40 PM.

  9. #7
    Join Date
    Feb 2009
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hi Medyman,

    I was using IPN before, but I have some affiliate tracking software installed also, which to be successful requires the users to be sent to the thank you page.

    PayPal generates usernames and passwords for you but it isn't compatible with auto return, so I can't guarantee the users will ever end up on the thank you page and be registered as a referall by the affiliate tracking software I have.

    This way still isn't foolproof, but users are not likely close the page until they have their username and password (as they have just payed for it).


  10. #8
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can't encrypt the url, but you can encrpy an extension using PHP.
    Jeremy | jfein.net

  11. #9
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by george- View Post
    Hi Medyman,

    I was using IPN before, but I have some affiliate tracking software installed also, which to be successful requires the users to be sent to the thank you page.

    PayPal generates usernames and passwords for you but it isn't compatible with auto return, so I can't guarantee the users will ever end up on the thank you page and be registered as a referall by the affiliate tracking software I have.

    This way still isn't foolproof, but users are not likely close the page until they have their username and password (as they have just payed for it).

    So, use IPN with auto-return and generate the usernames yourself.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •