You are here: Re: How to return data using POST « PHP Programming Language « IT news, forums, messages
Re: How to return data using POST

Posted by Colin McKinnon on 05/12/05 18:05

Gary Quiring wrote:

> I have a vendor sending me a text file using POST. I have a PHP program
> receiving the data that works. I need to in the same stream return an
> answer
> via POST. How do I send that POST in the same stream?
>

You seem to be describing something which isn't HTTP - in HTTP, the client
opens a socket to the designated port (default 80) on the server, sends a
request which is usually POST or GET (but can be other things to). The
server responds with some response headers and optionally some content. If
you want to initiate a POST from the server then it must initiate a new
connection _as_ a client.

If you merely want to make some response to the POST....just output
something to the browser:


print (count($_POST) ? "Thanks,...got it\n" : "eh ? Nothing sent\n");

POST and GET are semantically and functionally different in HTTP but, apart
from the fact they are stored in seperate variables, are no different from
the point of view of PHP (except when uploading files - because HTTP only
allows that via POST).

HTH

C.

 

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

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