Skip to content

Instantly share code, notes, and snippets.

@michaelhelmick
Created August 14, 2011 17:28
Show Gist options
  • Save michaelhelmick/1145097 to your computer and use it in GitHub Desktop.
Save michaelhelmick/1145097 to your computer and use it in GitHub Desktop.
$fh = fopen($box->download_url('862161200'), 'r'); // Open box.net file
$tmp = tempnam('/tmp', uniqid().'.docx'); // create tmp file
print_r($tmp);
echo '<br />';
$tfh = fopen($tmp, 'w');
fwrite($tfh, fread($fh, 13421772)); // write bytes from box.net file to tmp file
fseek($tfh, 0);
// Then load tmp file into ZipArchive->open() and use this function:
http://www.botskool.com/geeks/how-extract-text-docx-or-odt-files-using-php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment