how to verify HTTPS url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
munkitkat
Forum Newbie
Posts: 6
Joined: Thu Mar 10, 2016 6:22 am

how to verify HTTPS url

Post by munkitkat »

Any one can you please explain how to verify, and send https url using curl_setopt.
Thanks!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: how to verify HTTPS url

Post by requinix »

The only way it won't try to verify is if you specifically tell cURL not to. So... don't do that. Just make sure the URL starts with "https".
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: how to verify HTTPS url

Post by Christopher »

Here are a couple settings that apply to SSL that may help you identify the problem:

CURLOPT_SSL_VERIFYPEER
CURLOPT_SSL_VERIFYHOST
CURLOPT_CAINFO

And also:

CURLOPT_FOLLOWLOCATION
(#10850)
Post Reply