Create application on my web


I want to make a form that can create a twitter application and send the consumer key or some information to database
can i do this? and how?
can you show me the simple code for it

see the example (you need to login to create your own application)