Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default Possible PHP Script

    Hello,

    My friend wants to make a page that can tell if someone has paid through paypal when visiting it, or just visited it to try and get the thing without paying.

    My idea is, for the page to be PHP and to get the referer URL. If it starts with www.paypal.com or http://paypal.com then it uses "if" to show one page, or if it starts with anything else ("else") then it shows an error page.

    I was wondering how I could go about doing this/where to start. Or if someone could put together this little thing and spare a minute of their time for some rep

    Post below if you think you have anything that may help.

    Edit: It'll probably be using a function like..
    Code:
    $_SERVER["HTTP_REFERER"]
    Then the result will become a variable, and "if" it begins with paypal.com it will echo one page, "else", it'll echo an error.

    I just don't know how to code it so that it decides if the referer begins with paypal.com or not.
    Last edited by iUnknown; 23-02-2008 at 12:11 PM.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  2. #2
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by iUnknown View Post
    Hello,

    My friend wants to make a page that can tell if someone has paid through paypal when visiting it, or just visited it to try and get the thing without paying.

    My idea is, for the page to be PHP and to get the referer URL. If it starts with www.paypal.com or http://paypal.com then it uses "if" to show one page, or if it starts with anything else ("else") then it shows an error page.

    I was wondering how I could go about doing this/where to start. Or if someone could put together this little thing and spare a minute of their time for some rep

    Post below if you think you have anything that may help.

    Edit: It'll probably be using a function like..
    Code:
    $_SERVER["HTTP_REFERER"]
    Then the result will become a variable, and "if" it begins with paypal.com it will echo one page, "else", it'll echo an error.

    I just don't know how to code it so that it decides if the referer begins with paypal.com or not.
    doesnt paypal referr back to your site on a error?


  3. #3
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    IPN isn't it. It posts variables proving they payed.

  4. #4
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by Oojamaflip View Post
    doesnt paypal referr back to your site on a error?
    There is a success and fail link for a paypal button, but I'm talking about the success page creates something automatically and displays it on the page, but we don't want that to happen unless they've come from paypal, because that link gets exposed and people start getting the product for free otherwise.

    FlorX:

    PayPal does? Do you know where I can find what variables by any chance?
    Last edited by iUnknown; 23-02-2008 at 01:50 PM.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  5. #5
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    www.froobe.co.uk/paypal/

    Try that out (goes to sandbox) its a paypal IPN

  6. #6
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    I'm trying to just find somewhere that will tell me what variables are posted from PayPal to the success page, not from the pay page to paypal.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  7. #7
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Ew ryan your js is soo messed up

    And guy, i dont know if theres any way to change the referrer url to paypal.. Surely just building a licencing system on whatever your selling would make no need for it?
    Coming and going...
    Highers are getting the better of me

  8. #8
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by MrCraig View Post
    Ew ryan your js is soo messed up

    And guy, i dont know if theres any way to change the referrer url to paypal.. Surely just building a licencing system on whatever your selling would make no need for it?
    I'm doing it for a friend and he has a license system. But the "successfuly payment" url that paypal redirects the buyer too after payment creates the license details for them but can easily be exposed. for example, someone buys it, copy and pastes the URL that creates the license details to their mate and bang, everybody is going on it to get free licenses. To stop this from happening, I want it to detect if they came from the website paypal.com, and if they didnt then they just get an error (it's still easy to get around but they won't realise what's happening and as it is PHP, they can't view source and find out either).
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  9. #9
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    So like theres only one licence code :S?

    Thats a bit weird tbh..

    You could always get your friend to make it so that the licencing system only works with one site also...

    But sorry, im not too good at paypal IPN, im sure there is a way to do it.. but dont know sorry. Good luck finding out.
    Coming and going...
    Highers are getting the better of me

  10. #10
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by MrCraig View Post
    So like theres only one licence code :S?

    Thats a bit weird tbh..

    You could always get your friend to make it so that the licencing system only works with one site also...

    But sorry, im not too good at paypal IPN, im sure there is a way to do it.. but dont know sorry. Good luck finding out.
    It creates a random username and a random password and gives them a download link. After downloading, they open the EXE file enter their user and pass and it connects to license server etc. etc. but that has nothing to do with it.

    I'm closing the thread now, apparantly he found a solution..
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


Posting Permissions

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