Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine Parent URL??

Status
Not open for further replies.

colep

Programmer
Jul 18, 2002
58
0
0
US
Is there a way to know where the user came from (parent url) when entering a page on my site. I'm not finding anything on how to do this, but I'm sure it's possible.

Here's my exact problem:
I'm wanting to sell a program online that the user can then download once they have purchased it. One of the payment options is to pay through PayPal, but in using PayPal you can't get any info back from them. And the page that the user is redirected to from PayPal should make sure that they came from PayPal before letting them download the product.

Could anyone help me with this and point me in the right direction??? I sure would appreciate it!!! Thanks.

Cole ;)
 
There's a way to do it, but it's not deterministic.

In PHP, $_SERVER['HTTP_REFERER'] can tell you which page sent the browser to your page.

But, not every browser is going to report the referer. In Opera (which is my primary browser), I can turn referer logging on and off at will.

Also, even if you can make referer logging deterministic, there's no guarantee they actually paid for anything at PayPal. Does PayPal have some interface your site can interact with directly without sending your customers to the PayPal site?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
could it not be a demo until payment is confirmed

To err is human, to completely mess up takes a computer. [morning]
 
No PayPal doesn't (as far as I know). That's the bad thing about it. I'm building this site for someone else and they want the customer to have the option to pay with PayPal...

I guess I'll just use the HTTP_REFERER and see how well that works. Thanks for your help.

Cole ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top