http - PHP to check if its plausible to get SSL -


well not own wildcard ssl homepage, have quite few subdomains included in ssl certificate, wanna see if there plausible check if subdomain has valid ceritificate before redirecting subdomain in https.

why want know this? because i'm running domains through 1 php file, thats meant domaincontroll, that's including database pages exists , such, instead of having row in mysql weather not awailable in https kind-off waste, if there isn't answer question. there exists way wish.

thanks ~martin

you can use curl test. if curlopt_ssl_verifypeer set true (the default), result false.

<?php  $ch = curl_init('https://www.example.org'); curl_setopt($ch,curlopt_returntransfer,true); curl_setopt($ch,curlopt_followlocation,true); $result = curl_exec($ch); echo curl_error($ch); curl_setopt($ch,curlopt_ssl_verifypeer,false); $result = curl_exec($ch); echo curl_error($ch); 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -