I am in the way of cURL.But have some doubts. Does cURL needs the knowledge of variable used in the site to be posted ? Help !
You need to know which variables you want or need to post. Posting random variables to a page does not make sense. I don't know what you're trying to do, but if you want to emulate a form, just look at the source code and see how the fields are called. Don't forget to add hidden fields as well.
You must know all the variables indeed, but like Nico told, you can simply extract them from the HTML code of the form you want to submit. I guess that are the variables you mean.