http请求详解 防盗链技术

举例:

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请求信息

http请求详解 防盗链技术_第1张图片

 

 

http请求详解 防盗链技术_第2张图片

 

 

可以指定禁止指定ip的用户访问网页

http请求详解 防盗链技术_第3张图片

 

 http请求详解 防盗链技术_第4张图片

防盗链演示:

http请求详解 防盗链技术_第5张图片

 

 http请求详解 防盗链技术_第6张图片

 

你可能感兴趣的:(http请求详解 防盗链技术)