Skip to content

Instantly share code, notes, and snippets.

@mchelen
Created October 28, 2011 17:16
Show Gist options
  • Save mchelen/1322803 to your computer and use it in GitHub Desktop.
Save mchelen/1322803 to your computer and use it in GitHub Desktop.
GDocs Private
<?php
// mirrors html version of google document
// removes document url
// written by Mike Chelen http://twitter.com/mikechelen
// replace with your document url
$url = 'http://docs.google.com/document/pub?id=1dlED8mcx04XEKa0LXsezOviqPEyeE25sCi1HLUsADZI';
$homepage = file_get_contents($url);
$pattern = '/abuse\?id=[^"]+/i';
$replacement = 'removed';
echo preg_replace($pattern, $replacement, $homepage);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment