I have proble using curl simple_get
when trying to get json, it always return bool(false)
when I tried the api address in browser, they works just fine
Code:
public function test_curl()
{
$response = (object)null;
$data = json_decode($this->curl->simple_get('any_json_api_address'));
if (!empty($data))
{
$response->isSuccess = TRUE;
$response->message = 'success.';
$response->data = $data;
}
else
{
$response->isSuccess = FALSE;
$response->message = 'failed.';
}
echo json_encode($response);
}