RE: [PHP] http_post class raw output

From: Date: Wed, 09 Aug 2000 14:08:31 +0000
Subject: RE: [PHP] http_post class raw output
Groups: php.general 
Request: Send a blank email to php-general+get-10919@lists.php.net to get a copy of this message
I think I can safely conclude that your headers were dumped earlier. My approach would be to find out what they are? How? Well use $fp=fopen ("http://yoursite/yourscript.php, "r"); while (!feof($fp)){ $Document.=fread ($fp, 1024); } fclose ($fp); print $Document; If you look at the source (i'm not too sure about what the browser will display), you should be able to see what gets sent prior to your output (if anything). Mike -----Original Message----- From: Rohan Amin [mailto:rohana@seas.upenn.edu] Sent: Tuesday, August 08, 2000 9:18 PM To: php-general@lists.php.net Subject: Re: [PHP] http_post class raw output 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 > -- 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

« previous php.general (#10919) next »