Re: Is it possible to use header() to POST form data?

From: Date: Fri, 16 Dec 2005 07:03:31 +0000
Subject: Re: Is it possible to use header() to POST form data?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-227518@lists.php.net to get a copy of this message
On Thu, Dec 15, 2005 at 03:02:01PM -0800, pw wrote: > Philip Hallstrom wrote: > >>Does anyone know if it's possible to use the > >>header() function to POST form data to a URL? > >> > >>If so what syntax needs to be used? > > > > > >No, but a quick search for "HTTP POST PHP example" will get you the code > >you need. > > > > Thanks, > > I googled and, as you said, there was code there. > > 'sendToHost' I've always disliked this well known function, mostly because it is prone to to many unexepcted errors, and that for the fact that it is very old. You would be best off using on of the following solutions: http:://php.net/curl http://php.net/fsockopen (note the ability to handle errors in Example 1) http://us3.php.net/manual/en/ref.stream.php (if you want to write your own) Curt. -- cat .signature: No such file or directory

« previous php.general (#227518) next »