Results 1 to 3 of 3
Thread: Using GZIP inside my PHP scripts
Dec 4, 2002, 09:53 #1
- Join Date
- Jan 2002
- Scotland, UK
- 0 Post(s)
- 0 Thread(s)
Using GZIP inside my PHP scripts
I was wondering how you go about using GZIP (or another file compressor) from within your PHP scripts when run on a Linux server.
I have a script that backs up my forum to a .SQL file and then I download this but since the size is 80mb it takes a while.
What I wanted to do was use GZIP to compress it first so the filesize would be smaller for transfer.
I think my hosting company uses an older version of PHP 4 and Apache so will it still work ok?
Dec 4, 2002, 12:32 #2
If the php module has Zlib installed then it should be fine.....
Using the Zlib functions is pretty much exactly the same as the normal file functions. Just use gzfile(), gzopen(), gzread(), gzwrite(), gzclose() etc.........THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
OVER YOUR DOG. <-- MediaWiki installation guide
Dec 4, 2002, 14:52 #3
How are you doing the dump? Are you exec()ing mysqldump?
-- You lived inside my world so softly
-- Protected only by the kindness of your nature