Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个指向第二个域(例如www.example.es )的域指针(例如 www.example.com ),我想知道我来自哪个域。有可能用PHP做到这一点吗?
Try this $_SERVER["HTTP_REFERER"];
$_SERVER["HTTP_REFERER"];
假设“域指针”是指从一个域名指向另一个域名的 DNS CNAME 记录,那么要知道这两个域名中的哪一个实际用于访问该站点,请查看:
$server = $_SERVER["SERVER_NAME"];