have a look at ent_create, otherwise give a more detailed description of what you need

hope this helps