作者 刘锟

update

... ... @@ -240,7 +240,7 @@ class PostInquiryForward extends Command
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
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
$data['__amp_source_origin'] = trim($website, '/');
}
$url = $website . 'api/inquiryQd?source=5';
$res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
$res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
if (empty($res['code']) || $res['code'] != 200) {
$log->status = InquiryRelayDetailLog::STATUS_FAIL;
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
... ... @@ -307,7 +307,7 @@ class PostInquiryForward extends Command
'submit_time' => date('Y-m-d H:i:s', time() + 60)
];
$url = 'https://' . $detail['website'] . '/wp-admin/admin-ajax.php?action=live_remort_receive';
$res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data);
$res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data);
$status = $res->status();
if ($status != 200) {
$log->status = InquiryRelayDetailLog::STATUS_FAIL;
... ... @@ -330,7 +330,7 @@ class PostInquiryForward extends Command
'source' => 5,
];
$url = 'https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f';
$res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
$res = Http::withoutVerifying()->timeout(60)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
if (empty($res['status']) || $res['status'] != 200) {
$log->status = InquiryRelayDetailLog::STATUS_FAIL;
$log->remark = mb_substr($res['message'] ?? '', 0, 200);
... ...