title: Paypal - IPN integration with subcription using PHP class
body: <p>I'm using a Paypal class available here:<br>
  <a href="http://www.micahcarrick.com/php-paypal-ipn-integration-class.html" rel="nofollow">http://www.micahcarrick.com/php-paypal-ipn-integration-class.html</a><br>
  by Micah Carrick for paypal integration along with IPN.</p>
  
  <p>Now, I want users to subscribe and I want to handle the subscription/unsubscription IPN's.
  This is the current code:</p>
  
  <pre><code>case 'ipn': 
  
  if ($p-&gt;validate_ipn()) {
  
       // Payment has been recieved and IPN is verified.  This is where you
       // update your database to activate or process the order, or setup
       // the database with the user's order details, email an administrator,
       // etc.  You can access a slew of information via the ipn_data() array.
  </code></pre>
  
  <p>How would I detect if the event is "subscription", "un-subscription" or anything else?  </p>
  
  <p>Thanks in advance,<br>
  happyhardik</p>