Bind CURL calls to WHMCS to ipv4 adapter because WHMCS IP whitelist

doesn't support IPv6

* Fixes WHMCS login for all airtime.pro users
This commit is contained in:
Albert Santoni 2014-12-01 16:10:03 -05:00
parent 94d9577539
commit 183fa7b3a3
3 changed files with 11 additions and 5 deletions

View file

@ -572,6 +572,7 @@ class BillingController extends Zend_Controller_Action {
try {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // WHMCS IP whitelist doesn't support IPv6
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5); //Aggressive 5 second timeout
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@ -598,4 +599,4 @@ class BillingController extends Zend_Controller_Action {
throw new Exception("Invalid client ID: " . Application_Model_Preference::GetClientId());
}
}
}
}