One of my programs requires payment from users.

It will work like the following:
1. They pay me
2. I send them the Application

But i want to prevent people from re-distributing it when It's been downloaded.. What's the best way to do this? I would like to create something the connects to a database, and when the users have payed, i create them/they create a user+Password and they use that to connect...

Does anyone know how to do this?
Like all my other thread, if you need any further information, just ask.