Get referrer URL - visitors coming from Paypal (HTTPS) Get referrer URL - visitors coming from Paypal (HTTPS) php php

Get referrer URL - visitors coming from Paypal (HTTPS)


In case your site uses HTTP (not HTTPS) and PayPal uses HTTPS, there is no Referrer being sent!

HTTP RFC - 15.1.3 Encoding Sensitive Information in URI's states:

Clients SHOULD NOT include a Referer header field in a (non-secure)HTTP request if the referring page was transferred with a secureprotocol.

So the only way to get the Referrer is to use HTTPS on your site.


You can examine IPN. It sends notification when a transaction is affected.
URL : https://www.paypal.com/ipn


The referer is unfortunatly set BY the client and some browser (or plugins) allow the user to edit what referer is sent to the server. It's never a good idea to trust "critical" (in your case I guess) informations sent by the user. However this is the only information you have regarding where the user comes from (if you decide not to use what paypal can offer).