Now let's take a look at Instant Payment Notification [a.k.a. IPN]
First of all, know this: it's not so instant. That's why you use PDT to generate the html page. PayPal will contact your IPN when payments clear--useful for echecks and such.
I'm using IPN for sending out emails to customers.
The best way to get started is to just look at my IPN cgi. here
Finally, some words about security.
What's next?
You could make a simple cgi to retrieve forgotten registration keys. You would want to e-mail them to the owner.
Instead of using a simple flat text file for our database, you could learn some mySQL.
Finally, don't forget the helping hand. This project represents a pretty large investment of my time-- reading PayPal's manuals, emailing support and pulling my hair out. If you choose to use my scripts and stacks you might like to send me a cup of coffee. via PayPal, 'natch