ISTOTEXNIKI
loading...
Αποσυμπιεση αρχειων online

Script to extract zip file to xml or csv

extract-zip-to-xml-csv-for-import

Script to export a zip file in xml or csv automatically to a folder on our server. It is necessary as especially in WordPress, if you are using the plugin WP ALLIMPORT PRO, does not support import from zip file, only xml or csv. In this case, with the code below, export your live file to a folder of your choice, so you have your file in live xml / csv. It goes without saying that the zip link already points to some xml / csv file when you try to open its url.

The process is simple, create a new php file and inside it copy the following code. You will simply replace the demo url (“your_zip_link”) we put with yours and when you “run” this file, it will export the xml / csv to the folder “dfolder“.

You can use a cron job to run at intervals (as often as you want) so that you always have the latest version of your file.

open($zip_file) != "true") { echo "Error :- Unable to open the Zip File"; } $zip->extractTo($extrPath); $zip->close(); ?>
ΚΛΕΙΣΙΜΟ