You are here: Re: Sending data via POST « PHP « IT news, forums, messages
Re: Sending data via POST

Posted by Todd Cary on 10/12/99 11:10

Shawn -

Many thanks! I have a class I wrote that does that, but I thought I may
have overlooked something simplier.

Todd

Shawn Kelly wrote:
> This is from php.net:
> Just change the $out to fill with your POST request (instead of the
> GET). Works good, you can change ports. :)
>
> |$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
> if (!$fp) {
> echo "$errstr ($errno)<br />\n";
> } else {
> $out = "GET / HTTP/1.1\r\n";
> $out .= "Host: www.example.com\r\n";
> $out .= "Connection: Close\r\n\r\n";
>
> fwrite($fp, $out);
> while (!feof($fp)) {
> echo fgets($fp, 128);
> }
> fclose($fp);
> }
> |
>
> "Todd Cary" <todd@aristesoftware.com
> <mailto:todd@aristesoftware.com>> wrote in message
> news:4232095B.4040307@aristesoftware.com...
> Currently I send data to another page by using
>
> header("Location: http://" . |$_SERVER['HTTP_HOST'] .|
> | dirname($_SERVER['PHP_SELF']) . |
> | "/" . $relative_url . |
> | "?" . $my_data);|
> ||
> ||My client would like the data passed via a POST rather than in the
> URL.
>
> Can this be done and if so, how?
>
> ||Many thanks....
>
> Todd
> ||
>
> --

 

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

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