舉例:
GET /test/hello.html HTTP/1.1
【表示發送的get請求,請求資源是/test/hello.html】
Accept: */* 【表示客戶端可以接受任何資料】
Referer: http://localhost:80/test/abc.html 【表示我是從哪里來】
Accept-Language: zh-cn 【頁面語言】
User-Agent: Mozilla/4.0 【告訴服務我的瀏覽器的內核,作業系統】
Acccept-Encoding: gzip, deflate 【表示接受什么樣的資料壓縮格式】
Host: localhost:80 【主機:80】
Connection: Keep-Alive 【表示不要立即斷掉我們的請求】
使用$_SERVER查看所有http請求資訊


可以指定禁止指定ip的用戶訪問網頁


防盜鏈演示:


轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/1927.html
標籤:PHP
上一篇:Java選擇結構與變數
