为什么我的 cURL 上传文件被 forti 防火墙检测为 IPS 攻击:
function post_files($url, $files,$data=array()) {
if (!is_array($files)) {
//Convert to array
$files[] = $files;
}
$n = sizeof($files);
for ($i = 0; $i < $n; $i++) {
$data['file' + $i] = "@" . $files[$i];
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$response = curl_exec($ch);
return $response;
}
有卷曲选项吗?