PHP Learning Note 37 "http"

Source: Internet
Author: User

<?PHPPrint_r($_server);//$_server precompiled variable "array" Output request message, note case  Echo"<br/>"; foreach($_server  as $key=$val)  {      Echo $val." <br/> "; }   Echo"IP currently in Access:".$_server["REMOTE_ADDR"]; if($_server["REMOTE_ADDR"]== ":: 1")   {       Echo"<br/>"; Echo $_server[' REMOTE_ADDR ']; }Else      {     Echo"<br/>"; Echo $_server[' REMOTE_ADDR ']; }  ?>

/************************************************************************************************************** *******/

//the difference between get and post1.The data for the security GET request is displayed on the address bar, and the data for the post request is placed on the request message2.look at the size of the data that can be submitted2.The 1http protocol itself does not show the size of the data2.2 Browser restrictions on Get and post requests, get request data 2k+35,Post No Limit<a href= "http://localhost/" > View </a>//anti-theft chain<?PHPif(isset($_server(' Http_referer ')))//determine if there is a value {    //removed    if(Strpos($_server(' Http_referer '), "http://localhost/") ==0)    {     ////Strpos indicates that the first occurrence of the string index//represents the Site page access    }     }?>

PHP Learning Note 37 "http"

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.