turbofandude Posted December 16, 2013 Share Posted December 16, 2013 Hello, I posted this over on Stack Overflow and cannot seem to get an answer, and I'd appreciate any help someone could offer. The question was: I am trying to use the WHMCS API to connect a third party script to it. I have created the third party's script as follows, however, when I try to connect to my site using HTTPS, I get this error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol If I use HTTP, I get a 404 error. The code is as follows (and yes, that is my actual domain, since I figured the SSL's specifics might matter): $email = $_GET["email"]; $password = $_GET["password"]; if(filter_var($email, FILTER_VALIDATE_EMAIL) && strlen($password) > 0) { $postfields["username"] = $apiusername; $postfields["password"] = $apipassword; $postfields["action"] = "validatelogin"; $postfields["email"] = $email; $postfields["password2"] = $password; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://tfdidesign.com/accounts/includes/api.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); if(curl_error($ch)) echo(curl_error($ch)); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } } else die("INVALID_CREDENTIALS"); 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.