You are here: Re: [PHP] Is it possible to use header() to POST form data? « PHP « IT news, forums, messages
Re: [PHP] Is it possible to use header() to POST form data?

Posted by Curt Zirzow on 12/16/05 09:03

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация