The post method using indy components

i'm trying to post data to a php (Version 4.3.8) webpage using indy components (version 8.0.25),it comes with builder 6, but it doesn't work. The webpage return a empty array. Anyone can help me ? You can see the c++ builder and php code below.
best regards!

//C++ Builder code

void __fastcall TForm1::Button1Click(TObject *Sender)
{

// i'm runing tcpviwer on localhost port 5555, so i'm able to see what happen
IdHTTP1->Request->ProxyPort=5555;
IdHTTP1->Request->ProxyServer="localhost";

TStringStream* ret_url = new TStringStream("");
TStringList *parametros = new TStringList();

//this web site exist you can test
AnsiString url="http://www.transito.com.br/teste/hen.php";
parametros->Add("PIN=1234567890113");
IdHTTP1->Post(url,parametros,ret_url);

Memo1->Lines->Add(ret_url->DataString);

}

//PHP code

<?
echo"dados postados:<br>";
print_r($_POST);
?>
directcallAsked:
Who is Participating?
 
kode99Connect With a Mentor Commented:
I would suggest updating Indy to the current version 9.x.  I think I have 9.14 but I beleive the most recent is 9.17.  There have been some pretty significant changes.

Anyway,  I ran the code without the proxy settings and my result was as follows:

dados postados:<br>Array
(
    [PIN] => 1234567890113
)


It's not empty but I don't know what you are expecting to come back.


0
 
directcallAuthor Commented:
Why does noboby answer anything about my doubt?
0
All Courses

From novice to tech pro — start learning today.