-
-
Save mattrobenolt/1145125 to your computer and use it in GitHub Desktop.
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 characters
$fh = fopen($box->download_url('862161200'), 'r'); // Open box.net file | |
$tmp = tempnam(sys_get_temp_dir(), 'DOC'); // 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 | |
unlink($tmp); // make sure to cleanup the file after it's used! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment