使用Urban airship PHP定制iOS负载

I am trying to send some custom data with the payload to iOS devices. I use the following code to successfully send pushes to all devices but i need to send some additonal data. Can anyone point me in the right direction, couldnt find any documentation for urban airship and everything i tried just gives me errors.

Thanks

Jonathan

     $contents = array();
     $contents['badge'] = "+1";
     $contents['alert'] = $message;
     $contents['sound'] = "cat.caf";
     $notification = array();
     $notification['ios'] = $contents;
     $platform = array();
     array_push($platform, "ios");

     $push = array("audience"=>"all", "notification"=>$notification, "device_types"=>$platform);

     $json = json_encode($push);

     $session = curl_init(PUSHURL);
     curl_setopt($session, CURLOPT_USERPWD, APPKEY . ':' . PUSHSECRET);
     curl_setopt($session, CURLOPT_POST, True);
     curl_setopt($session, CURLOPT_POSTFIELDS, $json);
     curl_setopt($session, CURLOPT_HEADER, False);
     curl_setopt($session, CURLOPT_RETURNTRANSFER, True);
     curl_setopt($session, CURLOPT_HTTPHEADER, array('Content-Type:application/json', 'Accept: application/vnd.urbanairship+json; version=3;'));
     $content = curl_exec($session);

After some research I came to this. In the 'contents' section of your code add this line:

$contents['extra'] = array("message"=>"another message");

This should enable you to send additional custom data along with your push.