php Programming Glossary: zip
How to [recursively] Zip a directory in PHP? http://stackoverflow.com/questions/1334613/how-to-recursively-zip-a-directory-in-php 0.6 bugfix lib other Zip.php . I'm not sure how to zip a directory rather than just a file. Here's what I have so far.. file1.html 1251280379 home file2.html 1251280377 etc... zip new Zip foreach aFiles as fileLocation time file target . ... fileLocation if is_file file buffer file_get_contents file zip addFile buffer fileLocation THEN_SOME_PHP_CLASS toDownloadData..
Insert/update helper function using PDO http://stackoverflow.com/questions/3773406/insert-update-helper-function-using-pdo _POST 'id' fields explode name surname lastname address zip fax phone _POST 'date' _POST 'y' . . _POST 'm' . . _POST 'd'.. rtrim set ' ' fields explode name surname lastname address zip fax phone date _POST 'date' _POST 'y' . . _POST 'm' . _POST..
MySQL Great Circle Distance (Haversine formula) http://stackoverflow.com/questions/574691/mysql-great-circle-distance-haversine-formula MySQL. Here's my current PHP Code if distance Any customer_zip get the great circle distance get the origin zip code info zip_sql.. customer_zip get the great circle distance get the origin zip code info zip_sql SELECT FROM zip_code WHERE zip_code ' customer_zip'.. get the great circle distance get the origin zip code info zip_sql SELECT FROM zip_code WHERE zip_code ' customer_zip' result..
Stop people uploading malicious PHP files via forms http://stackoverflow.com/questions/602539/stop-people-uploading-malicious-php-files-via-forms in php on my website where people are able to upload a zip file. The zip file is then extracted and all file locations.. my website where people are able to upload a zip file. The zip file is then extracted and all file locations are added to a.. pictures only obviously with the files being inside the zip folder I cant check what files are being uploaded until the..
PHP ZIP files on the fly http://stackoverflow.com/questions/1061710/php-zip-files-on-the-fly ZIP files on the fly What's the easiest way to zip say 2 files..
Parsing and generating Microsoft Office 2007 files (.docx, .xlsx, .pptx) http://stackoverflow.com/questions/173246/parsing-and-generating-microsoft-office-2007-files-docx-xlsx-pptx the file name. Double click the file. It will open in the ZIP application. You can see the parts that comprise the file. Extract..
download multiple files as zip in php http://stackoverflow.com/questions/1754352/download-multiple-files-as-zip-in-php question You can use the ZipArchive class to create a ZIP file and stream it to the client. Something like files array..
Reading/Writing a MS Word file in PHP http://stackoverflow.com/questions/188452/reading-writing-a-ms-word-file-in-php databyss pointed out here the DOCX file format is just a ZIP archive with XML files included. There are a lot of resources..
compress/archive folder using php script http://stackoverflow.com/questions/3828385/compress-archive-folder-using-php-script files to a .zip file no zip file exists it creates a new ZIP file increase script timeout value ini_set 'max_execution_time'.. new ZipArchive open archive if zip open 'my archive.zip' ZIPARCHIVE CREATE TRUE die Could not open archive initialize an..
php creating zips without path to files inside the zip http://stackoverflow.com/questions/3993105/php-creating-zips-without-path-to-files-inside-the-zip zip new ZipArchive if zip open destination overwrite ZIPARCHIVE OVERWRITE ZIPARCHIVE CREATE true return false foreach.. if zip open destination overwrite ZIPARCHIVE OVERWRITE ZIPARCHIVE CREATE true return false foreach valid_files as file.. The path to the file to add. localname local name inside ZIP archive. This means that the first parameter is the path to..
Calculating distance between zip codes in PHP http://stackoverflow.com/questions/407989/calculating-distance-between-zip-codes-in-php etc from this This page . It has got the following fields ZIP LATITUDE LONGITUDE CITY STATE COUNTY ZIP_CLASS The data was.. following fields ZIP LATITUDE LONGITUDE CITY STATE COUNTY ZIP_CLASS The data was in a text file but I inserted it into a MySQL..
On-the-fly zipping & streaming of large files, in PHP or otherwise http://stackoverflow.com/questions/4357073/on-the-fly-zipping-streaming-of-large-files-in-php-or-otherwise is full the OS suspends the sending program. So here Info ZIP the zip util provided on OS X easily apt got c. on linux operates.. that uses all of @ Benji's suggestions and that creates a ZIP file instead of a TAR.GZIP file php make sure to send all headers.. suggestions and that creates a ZIP file instead of a TAR.GZIP file php make sure to send all headers first Content Type is..
How can I convert a docx document to html using php? http://stackoverflow.com/questions/4587216/how-can-i-convert-a-docx-document-to-html-using-php return the string function readDocx filePath Create new ZIP archive zip new ZipArchive dataFile 'word document.xml' Open..
How to zip a whole folder using PHP http://stackoverflow.com/questions/4914750/how-to-zip-a-whole-folder-using-php I have found here at stackoveflow some codes on how to ZIP a specific file but how about a specific folder Folder index.html..
Extract text from doc and docx http://stackoverflow.com/questions/5540886/extract-text-from-doc-and-docx function readZippedXML archiveFile dataFile Create new ZIP archive zip new ZipArchive Open received archive file if true..
Stop people uploading malicious PHP files via forms http://stackoverflow.com/questions/602539/stop-people-uploading-malicious-php-files-via-forms of the same sort that have affected most naive path based ZIP extractors. In addition you lay yourself open to attack from.. In addition you lay yourself open to attack from ZIP bombs . Best to avoid any danger of bad filenames by stepping.. the archive's help. Ignore the folder paths inside the ZIP. 3 If you can load an image file and save it back out again..
.rar, .zip files MIME Type http://stackoverflow.com/questions/6977544/rar-zip-files-mime-type a simple php upload script and users can upload only ZIP and RAR files. What MIME types I should use to check _FILES.. too. Here is how you could check if the file is a RAR or ZIP file. I tested it by creating a quick command line application... php if isRarOrZip argv 1 echo 'It is probably a RAR or ZIP file.' else echo 'It is probably not a RAR or ZIP file.' function..
PHP ZIP files on the fly http://stackoverflow.com/questions/1061710/php-zip-files-on-the-fly download Without saving the zip to the server. zip new ZipArchive the string file1 is the name we're assigning the file.. get the code above to work. An Invalid or unitialized Zip object error message was all I could get. So in order to make.. the example by Jonathan Baltazar on PHP.net manual at the ZipArchive open page Prepare File file tempnam tmp zip zip new ZipArchive..
PHP ZIP file download http://stackoverflow.com/questions/10681844/php-zip-file-download Script for downloading files in zip format zip.php php Zip file creation class. Makes zip files. Last Modification and.. name of the created archive file @access public @return ZipFile via Header public function forceDownload archiveName if.. Array of files with relative absolute path to be added in Zip File @access public function addFiles files Only Pass Array..
Finding Zip Codes in a Specific Radius http://stackoverflow.com/questions/1246271/finding-zip-codes-in-a-specific-radius Zip Codes in a Specific Radius I have found this popular PHP MySQL.. Radius I have found this popular PHP MySQL Script called Zip Location by SaniSoft and it works great besides one thing It.. provides I have discovered that the distance between the Zip Codes that the program gives me and my zip code are coming up..
How to [recursively] Zip a directory in PHP? http://stackoverflow.com/questions/1334613/how-to-recursively-zip-a-directory-in-php to recursively Zip a directory in PHP Directory is something like home file1.html.. file8.html Sub_Dir file19.html I am using the same PHP Zip class used in PHPMyAdmin http trac.seagullproject.org browser.. browser branches 0.6 bugfix lib other Zip.php . I'm not sure how to zip a directory rather than just a..
Helping using JSON for an API http://stackoverflow.com/questions/16798452/helping-using-json-for-an-api all the data into a simple page such as this City Salem Zip Code 97302 etc... I'm not quite sure where to start with this.. null firstName Masaharu company city New York postalZip 10011 provState NY name Morimoto address 88 10th Ave visibility..
PHP Recursive Backup Script http://stackoverflow.com/questions/2218111/php-recursive-backup-script question Here is an alternative though why don't you Zip the source directory instead function Zip source destination.. why don't you Zip the source directory instead function Zip source destination if extension_loaded 'zip' true if file_exists.. 'zip' true if file_exists source true zip new ZipArchive if zip open destination ZIPARCHIVE CREATE true source..
Zip Stream in PHP http://stackoverflow.com/questions/3078266/zip-stream-in-php Stream in PHP I have a PHP script that creates a zip file on..
Bulletin board - Database optimisation http://stackoverflow.com/questions/4310769/bulletin-board-database-optimisation they will never be able to have two Offices in the same Zip Code. NUMERIC 5 0 is good but I thought the US was moving towards.. . Now this column which was part of Address probably ZipCode has been elevated to a higher purpose without duplication.. explained conventions we will call it OfficeCode OfficeZipCode might be silly. We need an Unique Index on Name to ensure..
Dynamically created zip files by ZipStream in PHP won't open in OSX http://stackoverflow.com/questions/5573211/dynamically-created-zip-files-by-zipstream-in-php-wont-open-in-osx created zip files by ZipStream in PHP won't open in OSX I have a PHP site with a lot.. multiple files at a time as a .zip. I'm trying to use ZipStream to serve the zips on the fly with store compression so.. zip file if it would help but I'm pretty much just using ZipStream forcing it into large file mode and using store as the..
Select All Checkbox http://stackoverflow.com/questions/7259335/select-all-checkbox Name th th Property Address th th City th th State th th Zip th th Inspection Date th php while row mysql_fetch_assoc result..
PHP Zip 3 small text files and force download http://stackoverflow.com/questions/953996/php-zip-3-small-text-files-and-force-download Zip 3 small text files and force download My website writes 3 small.. manual en zip.examples.php Something like this zip new ZipArchive the string file1 is the name we're assigning the file..
|