This question already has an answer here:
There are some posts about the difference between POST
and GET
, but my problem is more specific, here it is:
I can use GET to send and get data from the server using this VBScript example:
Send "https://www.server.com/send.php"
Sub Send(url)
Dim objHTTP, MyResponse
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
objHTTP.Open "GET", url, False
objHTTP.Send "One Plus One"
MsgBox objHTTP.ResponseText()
End Sub
But this same example works if I change GET
with POST
, so:
- What's the difference?
- What should I use when I want to send and receive data at the same time?
And this is my PHP code on the server if you're interested:
<?php
$stdin = fopen('php://input', 'r');
$Data = '';
while (!feof($stdin))
$Data .= fread($stdin, 8192);
$Data .= " Equals Two";
echo $Data;
?>
Note that I didn't mention HTML, because my code has nothing to do with it, but if the difference has to do with HTML, I would be happy to know about it.
</div>