I am trying to send a messasge to my app that is configured with Google Cloud Messaging. I have a php function that I think is set up correctly.

```
    function send($message){
            $devices = array ('deviceid');
            $serverApiKey = 'apiKey';

    $fields = array(
        'registration_ids'  => $this->devices,
        'data'              => array( "message" => $message ),
    );

    $headers = array( 
        'Authorization: key=' . $this->serverApiKey,
        'Content-Type: application/json'
    );

    error_reporting(-1);
    // Open connection
    $ch = curl_init();

    // Set the url, number of POST vars, POST data
    curl_setopt( $ch, CURLOPT_URL, 'https://android.googleapis.com/gcm/send');
    curl_setopt( $ch, CURLOPT_POST, true );
    curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );

    curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $fields ) );

    // Execute post
    $result = curl_exec($ch);

    print_r(curl_getinfo($ch));

    // Close connection
    curl_close($ch);

    return $result;
}

```

but Curl never goes through with the request. It seems that nothing goes through. The print\_r code prints out:

```
Array ( [url] => https://android.googleapis.com/gcm/send [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.031 [namelookup_time] => 0 [connect_time] => 0.047 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 [certinfo] => Array ( ) [redirect_url] => )

```

Does any one know what I am doing wrong? I also will mention that I am running this script on a Windows machine that has WAMP Server installed. Curl is enabled. I'm completely lost as to why it is not working.