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.
2番目のドメイン(例:www.example.es )へのドメインポインタ(例:www.example.com )があり、どのドメインから来ているのか知りたいです。PHPでそれを行うことは可能ですか?
これを試して$_SERVER["HTTP_REFERER"];
$_SERVER["HTTP_REFERER"];
「ドメインポインタ」とは、あるドメイン名から別のドメイン名を指すDNS CNAMEレコードを意味すると仮定し、2つのドメイン名のどちらが実際にサイトへのアクセスに使用されたかを知るには、次を調べます。
$server = $_SERVER["SERVER_NAME"];