Hello,
I’m studying Airtable API and I have problem with receiving anything with cURL in PHP. All I’m getting is NULL value. Here is my code:
function refreshCache(){
//get cURL resource
$ch = curl_init();
//set url
curl_setopt($ch, CURLOPT_URL, 'https://airtable.com/tbl5g83TtrSE0LpS0/viwcGbSmDc5FhHrHg/rec2UUOz1aQEPsuFL?api_key=MY_HIDDEN_KEY');
$out = curl_exec($ch);
curl_close($ch);
file_put_contents('cache.txt', $out);
print_r($out);
echo("<br/>");
var_dump(json_decode($out));
}
refreshCache();
I know that I should receive SOMETHING, because table and rows aren’t empty. What I’m doing wornd? Thank you!