Hi NG,
i want to establish an SSL connection with cURL. I used two different
scripts,
1)
$URL=ssl.server.com/path/file.ext;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,https://$URL;);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS , $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$x = curl_errno($ch);
print($xbr$result);
curl_close ($ch);
and get exitcode 1
2)
function cURL ($URL, $options=)
{
$command=/usr/local/bin/curl;
$options.= --stderr;
$execstring=escapeshellcmd($command. .$URL. .$options);
exec($execstring, $stdout, $errorcode);
$output = implode (\n, $stdout);
if ($errorcode0) $output=;
return $output;
}
$URL=https://ssl.server.com/path/file.ext;;
$options= -d $data;
$data = cURL ($URL, $options);
and get exitcode 2
Why i get two different exitcodes and why i get in the second version
exitcode 2?
Can anyone help me to solve this problem?
--
Roman
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]