HTTP引荐来源网址

HTTP引荐来源网址

本文介绍了PHP HTTP引荐来源网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面,该页面接受来自远程站点的POST.我想检测这些POST来自的域.我意识到它可以被欺骗,但是总比没有好.我尝试访问HTTP_REFERER变量,但它只返回null.

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.

该页面接受来自PayPal(即时付款通知)和其他付款网关等来源的POST.

The page accepts POSTs from sources like PayPal (instant payment notifications) and other payment gateways.

如何获得推荐电话?

推荐答案

您正确拼写了Referer.应该是:

You spelled Referer correctly. It should be:

$_SERVER['HTTP_REFERER']

这篇关于PHP HTTP引荐来源网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 07:20