note 79399 rejected from ref.curl by nlopess

From: Date: Sun, 25 Nov 2007 12:23:55 +0000
Subject: note 79399 rejected from ref.curl by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-132555@lists.php.net to get a copy of this message
Note Submitter: bombicz dot zoli at gmail dot com ---- Hi all! At first sorry for my english, i am an hungarian developer. I want to create a curl function, what sends xml data to another server. Both servers uses https connections. At "receivers" server I can read data only with $request = file_get_contents('php://input'); but I don't know how to send data into php://input . I have the following code on the "senders" server: $_url = 'https://...url...'; $XPost = "<message request=\"location\"> <content> ....data.... </content> </message>"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_URL,$_url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_POSTFIELDS, $XPost); $result=curl_exec ($ch); curl_close ($ch); echo("Output: ".$result); but this code don't write xml string into php://input.

« previous php.notes (#132555) next »