title: How to save all DeviceTokens in php server for APNS iPhone app?
body: <p>Am integrating APNS in my iPhone app. I have walked through on Apple Push Notification document provided from Apple. I have a doubt on server side. Please find my doubts below,</p>
  
  <pre><code>  1. Apple said to create a server from below steps,
  
      Installing the SSL Certificate and Key on the Server:
      You should install the SSL distribution certificate and private cryptographic key you obtained earlier on the server computer on which the provider code runs and from which it connects with the sandbox or production versions of APNs. To do so, complete the following steps:
      1.1.Open Keychain Access utility and click the My Certificates category in the left pane.
      1.2.Find the certificate you want to install and disclose its contents.
      You'll see both a certificate and a private key.
      1.3.Select both the certificate and key, choose File &gt; Export Items, and export them as a Personal Information Exchange (.p12) file.
      1.4.Servers implemented in languages such as Ruby and Perl often are better able to deal with certificates in the Personal Information Exchange format. To convert the certificate to this format, complete the following steps:
           a.In KeyChain Access, select the certificate and choose File &gt; Export Items. Select the Personal Information Exchange (.p12) option, select a save location, and click Save.
           b.Launch the Terminal application and enter the following command after the prompt: openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes
      1.5.Copy the .pem certificate to the new computer and install it in the appropriate place.
  
  Am clear to create a server (i assume it will be .php server). Am doubt is how we storing all user's DeviceTokens in the server?
  
  2. How to send push notifications to all registered devicetokens?
  3. How to send push notifications to a specific user?
  </code></pre>
  
  <p>Can you please give some suggestion regarding my questions? I got a sample .php file from this link <code>http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12</code>. Please help me. Thanks in advance.</p>