I was having an issue with this before in that it was blocking AutoSSL, but @cPanelLauren helped me get that straight. So I turned CC_ALLOW_FILTER back on, only allowing US,MP,PR.
Positive: spam cut down by 95%, and server load is purring much better
Downside: I just discovered that none of my cURL scripts were working. No errors anywhere, they just didn't respond. I just now disabled CSF, and they all started working, so I know that this is the culprit.
Any suggestions on what I can do to make it work properly? If it helps, this is the function I use in PHP:
Positive: spam cut down by 95%, and server load is purring much better
Downside: I just discovered that none of my cURL scripts were working. No errors anywhere, they just didn't respond. I just now disabled CSF, and they all started working, so I know that this is the culprit.
Any suggestions on what I can do to make it work properly? If it helps, this is the function I use in PHP:
Code:
// Usage:
// $data = getFile('https://www.example.com/whatever.xml');
function getFile($url, $getInfo=false) {
$t = false;
if (strpos($url, 'http') === 0) {
$ch = curl_init(filter_var($url, FILTER_VALIDATE_URL));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 180);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$t = curl_exec($ch);
if ($getInfo && $t) {
$arr = curl_getinfo($ch);
$t = $arr['http_code'] === 200 ? $arr[$getInfo] : false;
}
curl_close($ch);
}
return $t;
}