title: How to resolve FCM curl failed error?
body: <p>I have implemented push notification using Fire base Cloud Messaging in Android, before today its working fine. But now, its not working. </p>
  
  <p>It shows Error like this:  </p>
  
  <blockquote>
    <p>Curl failed: Failed to connect to fcm.googleapis.com port 443:
    Connection timed out</p>
  </blockquote>
  
  <pre><code>&lt;?php 
  
  function send_notification ($tokens, $message)
  {
      $url = 'https://fcm.googleapis.com/fcm/send';
      $fields = array(
           'registration_ids' =&gt; $tokens,
           'data' =&gt; $message
          );
  
      $headers = array(
          'Authorization:key = API KEY ',
          'Content-Type: application/json'
          );
  
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, true);
     curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);  
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
     curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
     $result = curl_exec($ch);           
     if ($result === FALSE) {
         die('Curl failed: ' . curl_error($ch));
     }
     curl_close($ch);
     return $result;
  }
  
  
  
  $tokens = "Token here..";
  
  $message = array("message" =&gt; " FCM PUSH NOTIFICATION TEST MESSAGE");
  $message_status = send_notification($tokens, $message);
  echo $message_status;
  
  
  
  ?&gt;
  </code></pre>
  
  <p>Now How to resolve it?</p>