title: How to send tile and toast push notification at a time in windows phone using php code?
body: <p>I am developing for Windows Phone 8. I need to send toast and tile push notification at a time using PHP. I can receive toast or tile notification successfully but I need to combine these notifications. Can anyone tell me how to solve this issue?</p>
  
  <p>My code is given below</p>
  
  <pre><code>&lt;?php
       class WindowsPhonePushPriority
      {
        const TileImmediately = 1;
  
      }
  
      class WindowsPhonePushClient
    {
  private $device_url = '';
  private $debug_mode = false;
  
  function __construct($device_url)
  {
      $image_url = 'Images/purple.jpg';
      $this-&gt;device_url = $device_url;
  
  }
  
   public function send_tile_update($message1, $title, $priority =    WindowsPhonePushPriority::TileImmediately)
  {
     $title = 'push from Bestin Uk';
      $msg = "&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;".
             "&lt;wp:Notification xmlns:wp=\"WPNotification\"&gt;".
                "&lt;wp:Tile&gt;".
                "&lt;wp:BackgroundImage&gt;".$imageURL."&lt;/wp:BackgroundImage&gt;".
                "&lt;wp:Count&gt;".$message1."&lt;/wp:Count&gt;".
                "&lt;wp:Title&gt;".$title."&lt;/wp:Title&gt;".
                "&lt;wp:Param&gt;/Receive.xaml?NavigatedFrom=push&lt;/wp:Param&gt;".
                "&lt;/wp:Tile&gt;".
             "&lt;/wp:Notification&gt;";
  
      return $this-&gt;_send_push(array('X-WindowsPhone-Target: token','X-NotificationClass: ' . $priority,), $msg);
  }
  
  private function _send_push($headers, $msg)
  {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $this-&gt;device_url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_POST, true);
      curl_setopt($ch, CURLOPT_HEADER, true); 
      curl_setopt($ch, CURLOPT_HTTPHEADER,    // Add these headers to all requests
          $headers + array(
                          'Content-Type: text/xml',
                          'Accept: application/*'
                          )
          ); 
      curl_setopt($ch, CURLOPT_POSTFIELDS, $msg);
  
      if ($this-&gt;debug_mode)
      {
          curl_setopt($ch, CURLOPT_VERBOSE, $this-&gt;debug_mode);
          curl_setopt($ch, CURLOPT_STDERR, fopen('debug.log','w'));
      }
      $output = curl_exec($ch);
      echo $output;
      curl_close($ch);
  
      return array(
          'X-SubscriptionStatus'     =&gt; $this-&gt;_get_header_value($output, 'X-SubscriptionStatus'),
          'X-NotificationStatus'     =&gt; $this-&gt;_get_header_value($output, 'X-NotificationStatus'),
          'X-DeviceConnectionStatus' =&gt; $this-&gt;_get_header_value($output, 'X-DeviceConnectionStatus')
          );
    }
  
   private function _get_header_value($content, $header)
   {
      return preg_match_all("/$header: (.*)/i", $content, $match) ? $match[1][0] : "";
   }
  }
  
  
   ?&gt;
  </code></pre>
  
  <p>I have tried combined code but I am getting some time xml payload error</p>