For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > July 2005 > Problem with gzuncompress









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with gzuncompress
bissatch@yahoo.co.uk

2005-07-27, 5:03 pm

Hi,

I am trying to create a simple form that, when submitted, will
uncompress a string entered in a textarea using gzuncompress.

The entire HTML is below:

<?php

if (isset($_GET['action'])) {
if ($_GET['action'] =3D=3D "decompress") {
$newtext =3D gzuncompress(stripslashes($_POST['textar
ea']));
}
}

?><html>
<head>
</head>
<body>
<form name=3D"form1" method=3D"post"
action=3D"gzdecompress.php?action=3Ddecompress">
<textarea name=3D"textarea" rows=3D"8"><?php if (isset($newtext)) echo
$newtext; ?></textarea>
<br>
<input type=3D"submit" name=3D"Submit" value=3D"Submit">
</form>
</body>
</html>


To simplify things for now I have just been trying to use a very basic
string:

x=9C=CBH=CD=C9=C9, - which is the result of gzcompress("hello")

Unfortuntely it stumbles on the line that reads:

$newtext =3D gzuncompress(stripslashes($_POST['textar
ea']));

Giving the following error:

Warning: gzuncompress(): data error in
/home/martyn69/public_html/test/gzuncompress.php on line 5


Why can it not decompress it?

Cheers

Burnsy

bissatch@yahoo.co.uk

2005-07-28, 5:00 pm

well, anyone?

drwxr-xr-x

2005-07-28, 5:00 pm

On 28 Jul 2005 12:03:24 -0700, bissatch@yahoo.co.uk wrote:
> well, anyone?


Just _what_ are you nattering on about?
Oh, I see the problem:
X-Trace: posting.google.com

http://groups.google.com/googlegrou....html#summarize
http://oakroadsystems.com/genl/unice.htm#quote
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com