You are here: Re: [PHP] Decompress a zlib'd string in PHP « PHP « IT news, forums, messages
Re: [PHP] Decompress a zlib'd string in PHP

Posted by Jochem Maas on 10/26/05 20:20

Graham Anderson wrote:
> How do you decompress a zlib'd string located in a file with php ?
>
> I need to dynamically write a password string into a movie file.....
> It appears that in QuickTime movie API, all sprite variables/values are
> zlib'd inside the movie file
>
> So I need to:
> find the string
> decompress a zlib'd string inside a file.
> change its value => password=new_password
> recompress the new value
> write the zlib'd string back to the file
>
> I'm sure if I can decompress the string, then it will not be too hard
> to do the rest :)

I'm sure if you spent 5 seconds searching the manual you would find this page:
http://php.net/manual/en/function.gzuncompress.php

and this one:

http://php.net/manual/en/function.gzcompress.php

(HINT: I typed http://php.net/zlib into the address bar to find them)


'the rest' involves find your substring's beginning and ending offset and then
using those values to 'splice' the new substring (aka password) into the file/stream,
I can visualize how ot do it but have never actually needed to do something like
that ... I would say the compress/decompress is the easier part personally ...
buy hey as long as you get it working :-)


>
> many thanks

back at ya, I learnt some stuff answering (hopefully) you question ;-)

> g
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация