Page 1 of 1

Extracting files

Posted: Sun Jan 05, 2003 9:12 am
by kums
Hello everyone,

I need a help in extracting files, thru PHP. Is that possible to extract files from .tar, .gzip and zip files thru PHP.

Can anyone help me.


Thanks,
KumS

Posted: Sun Jan 05, 2003 1:57 pm
by Elmseeker
You could use the exec() function to achieve this, check out http://www.php.net/manual/en/function.exec.php...Have fun. :)

Posted: Sun Jan 05, 2003 6:15 pm
by BigE
Acually, PHP has extensions. First for gz there is the zlib extension. This can be found at http://www.php.net/zlib and for zip files you can use the zip extension. This can be found at http://www.php.net/zip Hope that helps.

Thanks

Posted: Mon Jan 06, 2003 3:37 am
by kums
Thks for ur replies,

Can u show a example, ie i have to extract a text file from the tar,zip or .gz and read the text file and write it in DB. I just need an example of extracting the text files in a particular folder.

Thks again
KumS