-
-
Save udithishara/4b606f15ceecf9dab01c to your computer and use it in GitHub Desktop.
Revisions
-
rilinweb created this gist
Apr 22, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ <?php $spreadsheetID = '1pO7BBOkhWL2TcBPYkDTlWZ0Gbw4mAUSadK_8NOn0Ij8'; $urlPath = 'http://spreadsheets.google.com/feeds/list/' . $spreadsheetID . '/od6/public/values?alt=json'; $file = file_get_contents($urlPath); $json = json_decode($file); $rows = $json->{'feed'}->{'entry'}; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Get Google Spreadsheet Data</title> <link rel="stylesheet" href="http://yandex.st/bootstrap/3.3.0/css/bootstrap.min.css"> </head> <body> <div class="container"> <div class="page-header"> <h1>Get Google Spreadsheet Data Example</h1> <p>See article <a target="_blank" href="http://rilin.ru/poluchaem-dann…le-i-vyvodim-i/">here</a></p> </div> <?php foreach ($rows as $row): ?> <div class="jumbotron"> <h1> <?php echo $row->{'gsx$title'}->{'$t'}; ?> </h1> <h2> <?php echo $row->{'gsx$subtitle'}->{'$t'}; ?> </h2> <?php echo $row->{'gsx$description'}->{'$t'}; ?> </div> <?php endforeach; ?> </div> </body> </html>