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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux