Checking where the user was linked from

Discussion in 'PHP' started by RichardKnox, Aug 10, 2007.

  1. #1
    Hey.

    I've been coding a couple of simple scripts and in one the user pays for his (or her) purchase via PayPal and then is redirected to a page on my server. Is there any code I can put on this page to check that it was PayPal that redirected them there to stop non paying users getting free copies.

    Thanks in advance,
    Richard
     
    RichardKnox, Aug 10, 2007 IP
  2. Doskono

    Doskono Peon

    Messages:
    153
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use $_SERVER['HTTTP_REFFERER'] but its not the best way, it's quite exploitable for what your doing.
     
    Doskono, Aug 10, 2007 IP
  3. RichardKnox

    RichardKnox Peon

    Messages:
    209
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you know of any other ways that aren't so exploitable?
     
    RichardKnox, Aug 10, 2007 IP
  4. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    PayPal already has support for all of this: read up on PDT and IPN at the PayPal developer site.
     
    TwistMyArm, Aug 10, 2007 IP