PHP 异步执行程序

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘https://xxx.lemont.cn?’ . http_build_query($param));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_NOSIGNAL, true);//注意,毫秒超时一定要设置这个
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 50);//超时时间10毫秒
//curl_setopt($ch, CURLOPT_TIMEOUT, 1);//秒
curl_exec($ch);
curl_close($ch);

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Back To Top

鄂ICP备17008157号-1