|
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]
|