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 Jerry Stuckle on 10/31/07 11:18

Jerry Stuckle wrote:
> Paul van Brouwershaven wrote:
>> 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);
>>
>>
>
> Also, IIRC, the results form the curl_init() should be false, and you
> should be able to get the error info from curl_errno() and/or
> curl_error(), not curl_getinfo().
>

Sorry, I mean the results from curl_exec() should be false.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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