paulcho Posted April 21, 2012 Share Posted April 21, 2012 Greetings, I am testing cURL functionality on our new web development server to upgrade WHMCS v4 to v5. ------------------------------------------------ WHMCS V5 integration API call Code: ------------------------------------------------ $url = WHMCS_HREF.'includes/api.php'; # URL to WHMCS API file $username = WHMCS_API_USERNAME; # Admin username goes here $password = WHMCS_API_PASSWORD; # Admin password goes here $postfields['action'] = 'addclient'; [.......other params......] $postfields["username"] = $username; $postfields["password"] = md5($password); foreach ($params as $key=>$val) { $postfields[$key] = $val; } # prepare the curl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); ----------------------------------------------- However, I have got the follow error message: 405 - HTTP verb used to access this page is not allowed. The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Error 139 (net::ERR_TEMPORARILY_THROTTLED): Requests to the server have been temporarily throttled. ------------------------------------------------ In case I enter the url in IE, whmcs api.php work. But the above client module got the error message. I have cURL enabled - UBUNTU 10.04.4, PHP 5.3.6-13, Apache 2.2.20 Please help me to solve the issue. Especially, regarding apache configuration file(ubuntu virtual host conf file), php.ini, .htaccess setting/configuration. Many thanks Paul 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.