You are here: Re: CURL: Result on console and in PHP are different « PHP Programming Language « IT news, forums, messages
Re: CURL: Result on console and in PHP are different

Posted by Paul van Brouwershaven on 10/31/07 10:30

On Oct 31, 11:21 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Yes, the certificate is set up forwww.verisign.com, so when you try to
> go to verisign.com you get a name mismatch and it fails.
>
> FYI, Firefox shows a message indicating the mismatch when you try to https://verisign.com, also.
Yes I know, thats the reason I try https://verisign.com but PHP is not
giving me the error message/number in the [ssl_verify_result] value.

I also tried:

$url = ' https://www.verisign.com';

$ch = curl_init();
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLE_OPERATION_TIMEOUTED, 10);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_CAINFO, '/usr/share/curl/cacert.pem');
curl_setopt($ch, CURLOPT_CAPATH, '/usr/share/curl/cacert.pem');
curl_setopt($ch, CURL_CA_BUNDLE, '/usr/share/curl/cacert.pem');

$result = curl_exec ($ch);
$info = curl_getinfo($ch);
curl_close ($ch);

print_r($info);

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация