title: Send Push Notifications to all users
body: <p>So, I have an App. This app, send a Push Notification using this PHP code:</p>
  
  <pre><code>&lt;?php
  
  $deviceToken = '4bc9b8e71b9......235095a22d';
  
  // Put your private key's passphrase here:
  $passphrase = '12345';
  
  // Put your alert message here:
  $message = 'My Message Here!';
  
  ////////////////////////////////////////////////////////////////////////////////
  
  $ctx = stream_context_create();
  stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
  stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
  
  // Open a connection to the APNS server
  $fp = stream_socket_client(
          'ssl://gateway.sandbox.push.apple.com:2195', $err,
  $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
  
  if (!$fp)
      exit("Failed to connect: $err $errstr" . PHP_EOL);
  
  echo 'Connected to APNS' . PHP_EOL;
  
  // Create the payload body
  $body['aps'] = array(
  'alert' =&gt; $message,
  'sound' =&gt; 'default'
  );
  
  // Encode the payload as JSON
  $payload = json_encode($body);
  
  // Build the binary notification
  $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) .                 $payload;
  
  // Send it to the server
  $result = fwrite($fp, $msg, strlen($msg));
  
  if (!$result)
  echo 'Message not delivered' . PHP_EOL;
  else
  echo 'Message successfully delivered' . PHP_EOL;
  
  // Close the connection to the server
  fclose($fp);
  </code></pre>
  
  <p>My question is: If I have more than one users in my app, and I run this PHP code in Terminal, the Push Notification will be send only to this Device (4bc9b8e71b9...), or it'll be send to all of my users? If this will be sent only to this Device, how can I send the Push to all my users?</p>
  
  <p>PS: I followed <a href="http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12" rel="nofollow">this</a> tutorial, and it worked as well, except because i dont know if the Push will be send to all my users.</p>
  
  <p>Sorry for the bad english, and <strong>thanks a lot</strong>!!</p>