do you mean a PHP server would connect with a Java one?
$headers = array( "Content-type: text/xml" ,"Content-Length: ".strlen($post_string) ,"Connection: close" ); $server = 'http://1.1.1.1:15000'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $server); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $data = curl_exec($ch);
Обсуждают сегодня