title: Failed to send Push Notification
body: <p>I try to send a message, but get nothing. Although no fails, when printing the variable:</p>
  
  <pre><code>$result
  </code></pre>
  
  <p>this returns "to" (I have no idea why).</p>
  
  <p>The code I use is :</p>
  
  <pre><code>﻿private function sendMessageGcm($registration_id,$message){             
    $this-&gt;key = "xxxxxxxxxxxxxxxxxxxxxx";
    $data = array(
      "registration_id" =&gt; $registration_id,
      "data" =&gt; $message
    );
    $headers = array(
      "Content-Type:application/json",
      "Authorization:key=" . $this-&gt;key
    );
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://android.googleapis.com/gcm/send");
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    $result = curl_exec($ch);
    if($result == false) {
      echo('Curl failed: ' . curl_error($ch));
    }
    curl_close($ch);
    $rtn["code"] = "000";//means result OK
    $rtn["msg"] = "OK";
    $rtn["result"] = $result;
    return($rtn);
  }
  </code></pre>