PHP Judgment URL originated

Source: Internet
Author: User
PHP Judgment URL Source
Q: Besides using $_server[' http_referer ' to judge

There's no other way. Determine the source of the previous URL.
------to solve the idea----------------------
Http_referer is an incoming CGI environment variable and does not always exist
The browser address bar does not have access, the client can also control does not emit

Use $_server[' Http_referer '] to determine if he has
if (Isset ($_server[' http_referer ')) {
echo $_server[' Http_referer '];
}
------to solve the idea----------------------
PHP only http_referer to judge.
But if the direct access to the page, there is no http_referer, so need to judge
if (Isset ($_server[' http_referer ')) {
echo $_server[' Http_referer '];
}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.