作者 刘锟

update

@@ -240,7 +240,7 @@ class PostInquiryForward extends Command @@ -240,7 +240,7 @@ class PostInquiryForward extends Command
240 $curl = curl_init($url); 240 $curl = curl_init($url);
241 curl_setopt($curl, CURLOPT_POST, 1); 241 curl_setopt($curl, CURLOPT_POST, 1);
242 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 242 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
243 - curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); 243 + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60);
244 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); 244 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
245 curl_setopt($curl, CURLOPT_AUTOREFERER, 1); 245 curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
246 curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36'); 246 curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36');
@@ -280,7 +280,7 @@ class PostInquiryForward extends Command @@ -280,7 +280,7 @@ class PostInquiryForward extends Command
280 $data['__amp_source_origin'] = trim($website, '/'); 280 $data['__amp_source_origin'] = trim($website, '/');
281 } 281 }
282 $url = $website . 'api/inquiryQd?source=5'; 282 $url = $website . 'api/inquiryQd?source=5';
283 - $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json(); 283 + $res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
284 if (empty($res['code']) || $res['code'] != 200) { 284 if (empty($res['code']) || $res['code'] != 200) {
285 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 285 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
286 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 286 $log->remark = mb_substr($res['message'] ?? '', 0, 200);
@@ -307,7 +307,7 @@ class PostInquiryForward extends Command @@ -307,7 +307,7 @@ class PostInquiryForward extends Command
307 'submit_time' => date('Y-m-d H:i:s', time() + 60) 307 'submit_time' => date('Y-m-d H:i:s', time() + 60)
308 ]; 308 ];
309 $url = 'https://' . $detail['website'] . '/wp-admin/admin-ajax.php?action=live_remort_receive'; 309 $url = 'https://' . $detail['website'] . '/wp-admin/admin-ajax.php?action=live_remort_receive';
310 - $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data); 310 + $res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data);
311 $status = $res->status(); 311 $status = $res->status();
312 if ($status != 200) { 312 if ($status != 200) {
313 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 313 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
@@ -330,7 +330,7 @@ class PostInquiryForward extends Command @@ -330,7 +330,7 @@ class PostInquiryForward extends Command
330 'source' => 5, 330 'source' => 5,
331 ]; 331 ];
332 $url = 'https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f'; 332 $url = 'https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f';
333 - $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json(); 333 + $res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
334 if (empty($res['status']) || $res['status'] != 200) { 334 if (empty($res['status']) || $res['status'] != 200) {
335 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 335 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
336 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 336 $log->remark = mb_substr($res['message'] ?? '', 0, 200);