View Full Version : Possible PHP Script
iUnknown
23-02-2008, 12:05 PM
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 (http://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 :D
Post below if you think you have anything that may help.
Edit: It'll probably be using a function like..
$_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.
DeejayMachoo$
23-02-2008, 01:08 PM
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 (http://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 :D
Post below if you think you have anything that may help.
Edit: It'll probably be using a function like..
$_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?
Florx
23-02-2008, 01:26 PM
IPN isn't it. It posts variables proving they payed.
iUnknown
23-02-2008, 01:48 PM
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?
www.froobe.co.uk/paypal/
Try that out (goes to sandbox) its a paypal IPN :P
iUnknown
23-02-2008, 02:27 PM
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.
MrCraig
23-02-2008, 03:02 PM
Ew ryan your js is soo messed up :P
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?
iUnknown
23-02-2008, 03:15 PM
Ew ryan your js is soo messed up :P
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).
MrCraig
23-02-2008, 04:04 PM
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. :)
iUnknown
23-02-2008, 04:23 PM
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..
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.