$url = ‘https://sheets.googleapis.com/v4/spreadsheets/<sheetId>/values/Sheet1?valueRenderOption=FORMATTED_VALUE&key=<api_key>’;
// Initiate curl
$ch = curl_init();
// Disable SSL verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Will return the response, if false it print the response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Set the url
curl_setopt($ch, CURLOPT_URL,$url);
// Execute
$result=curl_exec($ch);
// Closing
curl_close($ch);

echo ‘<pre>’; print_r($result);die((__FILE__).’–>’.(__FUNCTION__).’–Line(‘. (__LINE__).’)’);
//var_dump(json_decode($result, true));