bonjour

jais créer un script pour vérifier si un domaine et en ssl mais il marche pas , il me rend toujours 'ok'

vous pouvais me dire pourquoi ?

merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
function checkSsl($domain)
{	
    $ch = curl_init($domain);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_NOBODY,true);
 
   $ssl = curl_exec($ch);
   curl_close($ch);
   if ($ssl) return true;
   return false;
 }
   if (checkSsl('http://www.mondomain.com'))
   {
		$ifssl= 'ok';
   }
   else 
   {
		$ifssl='probleme avec la connexion ssl ';
   }

merci a vous