I have a page which accepts POSTs from a remote site. I would like to detect the domain that these POSTs are coming from. I realize that it can be spoofed but it is better than nothing. I have tried accessing the HTTP_REFERER variable but it just returns null.
The page accepts POSTs from sources like PayPal (instant payment notifications) and other payment gateways.
How can I get the referring call?
You spelled Referer correctly. It should be:
$_SERVER['HTTP_REFERER']
$_SERVER['HTTP_REFERER']
with a single R, try var_dump($_SERVER) for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With