Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save udithishara/b67fe7cd405ec580488c to your computer and use it in GitHub Desktop.
Save udithishara/b67fe7cd405ec580488c to your computer and use it in GitHub Desktop.
Google spreadsheet reader in PHP
<?php
// URL to spreadsheet. Make sure to append ?alt=json to return contents in JSON format
$url = 'https://spreadsheets.google.com/feeds/list/0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc/od6/public/values?alt=json';
$file= file_get_contents($url);
$json = json_decode($file);
echo '<pre>'.print_r($json, 1).'</pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment