Now I have another problem
Everytime I submit an answer, it only returns an empty page. http://www.microcontest.com/interface.php states that it should return "0" or the points gained.
I submit the answers via POST to http://www.microcontest.com/contests/$levelid/validation.php with PHPSESSID as cookie, which I got from the request for the variables, and the solution as POST, where the name of the var is, what the level site says. In level 1 for example "s", so my POST is s=123.
Ok, I got it now.
The solution submission needs the 60gp cookie. This cookie is given when requesting the variables - But ONLY, if there is already a PHPSESSID set.
That is of course totally incompatible with the doc @ http://www.microcontest.com/interface.php, which says that the PHPSESSID is generated upon requesting the variables, and that you need to use it for the solution submission.
But without PHPSESSID => no 60gp cookie => no solution submission..
So what I do now is:
1) Let the program login to the site with username, sha1 via the login form. Save the PHPSESSID
2) Request the variables using PHPSESSID in cookie & username+sha1 in POST, save 60gp cookie
3) Submit solution, using PHPSESSID & 60gp