I want to get curl response using the following code :
$url = "http://google.co.in";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
$result=curl_exec ($ch);
if(curl_exec($ch) === false) {
print_r($result);
echo "ok";
}
else {
echo "error";
}
curl_close ($ch);
But when I am executing the code then getting response 'OK' but not printing the value of result
. What I am missing ?