I've got a PHP form and I want to send data to application (by POST method)
How to receive values from the form?
And how to send an answer to PHP?
procedure TForm1.LHTTPReceive(aSocket: TLSocket);
var
r,s:string;
begin
if aSocket.GetMessage(r) > 0 then
begin
Memo1.Lines.Add(r);
end;
s:='HTTP/1.1 302 Moved Temporarily'+'Location:
http://google.com'+'Connection: close';
LHTTP.SendMessage(s,aSocket);
end;
procedure TForm1.ButtonConnectClick(Sender: TObject);
begin
LHTTP.Listen(StrToInt(EditPort.Text));
if LHTTP.Listen=true then Memo1.Lines.Add('receiveing on port: ' + EditPort.Text);
end;
but, PHP can't find the page :/ (it works when i try do it via lnet and TCP ... but very slow... and i receive too much data from PHP)