php curl develop micro-channel public number returns false

Recently developed new to the warm public number, in the custom menu request with curl, ran into a pit. Half past one would not resolved, then ask the degree of your mother, Google. $ Url discoveries are saying there are failures caused by a space.

But I did not spaces, always return false, this time I thought, curl to check the legitimacy of the certificate, then add the following two code

curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, 0 ); // stop checking the certificate of 
    curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, 2 );

  Now let the program up and running, OK

Guess you like

Origin www.cnblogs.com/dlmg/p/11367428.html