Re: http_post class raw output
| From: | Rohan Amin | Date: | Wed, 09 Aug 2000 01:17:55 +0000 |
| Subject: | Re: http_post class raw output | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10818@lists.php.net to get a copy of this message | ||
Yes, you are right, it is a http header...
I am not sending anything prior to results from the post class. Here is the
code:
$p=new http_post;
$p->set_file("signup.php");
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$p->set_element(htmlentities($key),htmlentities($val));
}
$p->set_timeout(120);
$debug=false;
if ($debug) $p->show_post();
$content = $p->send($debug) or header ($db_error_location);
echo "$content";
I don't think I am sending anything prior. I can't seem to make this work
right...
Thanks for your help.
Rohan :-)
<scottrus@ipass.net> wrote in message
news:20000808210454.A29112@ipass.net...
> I haven't looked at this class but based on the text you've pasted
> below it looks like what you're calling 'raw output' is really an
> http header.
>
> Are you sending your page headers prior to results from the post class?
> If so what's happening maybe that the first http header is received and
> everything after it, including the second header sent by the post class,
> is rendered in the browser.
>
> -- Scott
>
> On Tue, Aug 08, 2000 at 08:35:10PM -0400, Rohan Amin wrote:
> > Hello,
> >
> > I am trying to post from within a PHP form.
> >
> > I download the http_post class from :
> > http://px.sklar.com/code.html?code_id=313
> >
> > Everything works fine, however the script creates some raw output on the
> > posted (action) page:
> >
> > HTTP/1.1 200 OK Date: Wed, 09 Aug 2000 00:25:03 GMT Server:
Apache/1.3.12
> > (Unix) PHP/4.0.1pl2 X-Powered-By: PHP/4.0.1pl2 Connection: close
> > Content-Type: text/html
> >
> > <HTML>
> >
> > ....
> >
> > So that raw ouput appears before the HTML actually does. Any way to
> > suppress this?
> >
> > Any other classes that you use for posting from a PHP script?
> >
> > Thanks,
> >
> > Rohan :-)
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> Scott
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>