R
rodrigo.rodenbeek
Hello, guys.
I would like to knoe how to do following example in java, instead of
PHP
--- start ---
$id = 1;
$postUrlData = array( 'id' => $id );
$ch = curl_init();
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_URL, "http://mysite/some-cgi" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postUrlData );
$data_returned = curl_exec( $ch );
curl_close( $ch );
if( $data_returned == "ok" )
echo "<pre>it's ok</pre>";
--- end ---
Regards,
Rodrigo
I would like to knoe how to do following example in java, instead of
PHP
--- start ---
$id = 1;
$postUrlData = array( 'id' => $id );
$ch = curl_init();
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_URL, "http://mysite/some-cgi" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postUrlData );
$data_returned = curl_exec( $ch );
curl_close( $ch );
if( $data_returned == "ok" )
echo "<pre>it's ok</pre>";
--- end ---
Regards,
Rodrigo