Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert curl_init() code to Java code

Status
Not open for further replies.

boske3

Programmer
Mar 11, 2006
20
RS
Hi everyone

I had PHP code but i need help how to convert it to Java code.
I search lots of examples but raerly on non of them has what i need.

So i need to convert this code to Java

$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_CONNECTTIMEOUT => 25,
CURLOPT_USERAGENT => 'PP-TTT',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $soap_post,//contains some SOAP code
CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
CURLOPT_URL => $url , // contains some CURLOPT_SSLCERT => '/ CURLOPT_SSLCERTPASSWD => 'pass123');

curl_setopt_array($ch , $options);
$answer = curl_exec($ch);

Any help will be appricate. Tnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top