合并分支 'master-server' 到 'master'
gx数据 查看合并请求 !1381
正在显示
1 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -66,12 +66,15 @@ class RequestUrlLog extends Command | @@ -66,12 +66,15 @@ class RequestUrlLog extends Command | ||
| 66 | public function postRequest($url, $postData) { | 66 | public function postRequest($url, $postData) { |
| 67 | $ch = curl_init(); | 67 | $ch = curl_init(); |
| 68 | curl_setopt($ch, CURLOPT_URL, $url); | 68 | curl_setopt($ch, CURLOPT_URL, $url); |
| 69 | - curl_setopt($ch, CURLOPT_POST, true); | ||
| 70 | - curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); | ||
| 71 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | 69 | + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); |
| 72 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | 70 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
| 73 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); | 71 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); |
| 74 | curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); | 72 | curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); |
| 73 | + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)'); | ||
| 74 | + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | ||
| 75 | + curl_setopt($ch, CURLOPT_AUTOREFERER, 1); | ||
| 76 | + curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); | ||
| 77 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| 75 | // 记录请求开始时间 | 78 | // 记录请求开始时间 |
| 76 | $startTime = microtime(true); | 79 | $startTime = microtime(true); |
| 77 | $response = curl_exec($ch); | 80 | $response = curl_exec($ch); |
-
请 注册 或 登录 后发表评论