Don`t get it what I`m doing wrong. The post method doesn`t work for me...
The php source:
Quelltext
1: 2: 3:
| <? echo $_POST['test']; ?> |
The delphi source:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
| var input, output : Tstringstream; begin input := TStringstream.Create(''); output := TStringstream.Create(''); try input.WriteString('test=helloworld'); Idhttp1.Request.ContentType := 'application/x-www-form-urlencoded'; Idhttp1.Post('http://localhost/testi/aha.php',input,output); Memo1.lines.LoadFromStream(output); finally input.free; output.free; end; |
As I understood. The output should be ''helloworld', but it allways gives out a blank page.
P.S. In every example that I`v looked there is a URLENcode function mentioned. I`m using Delphi 6 and I don`t have such a built-in funcion...As I know, the urlenocde is neede if there are some other characters like space...