-
-
Save yumyo/b0c89c78193946ce776c089da22c90c7 to your computer and use it in GitHub Desktop.
This file contains 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 characters
<?php | |
// This was a quick proof of concept from 2009, use the script freely - https://www.realisingdesigns.com/web-design-articles/using-google-docs-quick-easy-cms/ | |
// Specify document | |
$gd_doc = "dd9zpc9r_4jh8qv76j"; | |
$gd_doc_type = "doc"; | |
$gd_array = array(); | |
$gd_array["doc"]["url"] = "http://docs.google.com/View?id=".$gd_doc; | |
$gd_array["doc"]["start"] = '<div id="doc-contents">'; | |
$gd_array["doc"]["end"] = '<div id="google-view-footer">'; | |
$working_doc = file_get_contents($gd_array[$gd_doc_type]["url"]); | |
$gd_start = strpos($working_doc,$gd_array[$gd_doc_type]["start"]); | |
$gd_end = strpos($working_doc,$gd_array[$gd_doc_type]["end"]); | |
$gd_content = substr($working_doc, $gd_start, ($gd_end-$gd_start) ); | |
// Output | |
echo $gd_content; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment