[PHP] Gzinflate on a string that has been base_64 encoded in Windows
Greetings! I have a long piece of string that is apparently a PNG image which has been base_64 decoded in an XML file. I can retreive this string without problem. The string is in $mystra $pngdata = base64_decode($mystra); $pngdata = gzinflate($pngdata); When i try to gzinflate it , i get a warning that says "data error" and if i write pngdata to a binary file using fopen, there is 0 bytes (because of the warning). If i just write the base_64 decoded data to a binary file, then I can't open the file as a gziped file. (it is not a valid gzip'ed file) From the person who sent me the XML file, what I was told the base_64 decoded data will give me the deflated binary array for the image, which I would need to inflate using an InflaterInputStream, and as a result, I will get the PNG file that is represented in $mystra. I probably need to add some PNG headers to it and/or explode the base_64 decoded data and then add headers to it. I am getting quite lost here. Can anyone provide some hints please? Regards Venky
Re: [PHP] Running Scripts from the Command Line in Linux
Even better... if you want to use GET/POST, and access PHP scripts thru the web server, it is recommended to use wget very useful tool, supports http auth, etc. Regards Venky On 08/06/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: $ php script.php OOzy Pal wrote: > How can I run a .php script from the command in Linux? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php help.
On Saturday 19 July 2008 01:11:38 pm Belinda wrote: > Good morning > > I have just been browsing the web for help with a php problem that is > driving me mad. I didn't want to post to the site so hope that this email > may get a response. I thank you in advance. > > I am learning php myself(self-learning) but just can get me head around > this error.(lack of knowledge L) > > > > With regard to [function.file-get-contents] can anyone explain this error > to me...please :-) > > > > Warning: > file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_ >t opics&forum=Bea-Tropical&trans=1) [function.file-get-contents]: failed to > open stream: Connection refused in > /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line > 419. >> i think you are missing " " in the function : >> see below : >>[EMAIL PROTECTED]:~/py> php -r ' >>file_get_contents("http://www.ecofriendz.com/groups/orca/?action=group_last_t";); >> ' >>[EMAIL PROTECTED]:~/py> >> the URL must be inside " " > > > > I cannot resolve this issue. any help will be gratefully appreciated. > > > > With Kindest Regards > > > > Belinda Marsh