![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Http
每天瞎忙的农民工
保持好奇,求知若饥,终身编程
展开
-
PHP 在cURL中伪造头信息
在cURL中伪造头信息<?php@header('Content-type:text/htmlcharset=utf-8');//第一次初始化$ch = curl_init();curl_setopt($ch,CURLOPT,"http://xxxxx.com");curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);$h=array('HTTP_VIA:HTTP/1.1 SNXA-PS-WAP-GW21 (infox-WISG,Huawei Technol原创 2021-03-29 23:08:01 · 322 阅读 · 0 评论 -
php 模拟post提交请求,调用接口
有两种写法可以调用接口获取返回数据(如下):写法 一:方法,模拟post进行url请求/** * 模拟post进行url请求 * @param string $url * @param string $param */ function request_post($url = '', $param = '') { if (...原创 2019-03-27 14:29:31 · 5690 阅读 · 0 评论 -
HTTP1.0 与 HTTP1.1 的区别
1、HTTP 1.1支持长连接(PersistentConnection)和请求的流水线(Pipelining)处理HTTP 1.0规定浏览器与服务器只保持短暂的连接,浏览器的每次请求都需要与服务器建立一个TCP连接,服务器完成请求处理后立即断开TCP连接,服务器不跟踪每个客户也不记录过去的请求。HTTP 1.1则支持持久连接Persistent Connection, 并且默认使用per...转载 2019-07-23 14:25:22 · 174 阅读 · 0 评论