|
Posted by Olagato on 04/18/07 15:24
Hi,
I'm trying this SSL curl connection without success:
<?php
header('Content-Type: text/xml');
$url=urlencode("https://www.one-server.com/one-cgi.cgi");
$request="<request><plaintext>1111222233334444</plaintext></request>";
$ch = curl_init();
$res= curl_setopt ($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , true);
curl_setopt($ch, CURLOPT_PORT, 443);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec ($ch);
curl_close ($ch);
print_r($response);
?>
The error I get is :
"Error de lectura XML: no se encuentra elemento
Ubicación: http://my_server.com/index.php
Número de línea 1, columna 1:"
Any ideas ???
Navigation:
[Reply to this message]
|