Hey all, I’m having some problems when connecting to an ssl url using curl. Normally I should get some json back but for some reason it’s not doing anything and curl_error() returns me a “connection timed out”. I’m unable to find out what might be causing the trouble.
The code so far:
[php]
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “https://www.***.com/***/validate/7BFA32B2222222”);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, “[email protected]:12345”);
curl_setopt($ch, CURLOPT_HTTPGET, TRUE);
curl_setopt($ch, CURLOPT_PORT, 8443);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$curlRes = curl_exec($ch);
$data = json_decode($curlRes, true);[/php]
Going to the URL in my browser spawns me a login window and after that returns me the json properly. Also url’s on another server (not SSL) do work. After thinking about what might be causing the problem (as I also had this when I disabled SSL for this URL) I contacted my host to open up some ports which they kindly did telling me that should resolve the issue but it didn’t, neither with SSL nor without are working. I hope someone can shine some light on what might be causing the trouble here.