Good afternoon, I'm trying to make a call to a website using curl, from php, from windows 7 64bit, using wamp v2.2 and php v5.4.3. This returns a null. If in the same code I change the URL for a local, the curl works. Download a fix for the curl but the result is the same, in phpinfo the curl is working (in fact it works for a local url). Two days ago I'm trying to solve it, I do not know where to go, thank you very much.
<?PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://webservice...");
$response=curl_exec($ch);
if (!curl_errno($ch)) {
switch ($http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE)) {
case 200: # OK
break;
default:
echo 'Código HTTP inesperado: ', $http_code, "\n";
}
}else{
$response=json_decode($response);
var_dump($response);
}
curl_close($ch);/*
?>