Ran Wireshark (WS) and found out a couple things.
- You must be registered.
- It does use cookies.
- JavaScript generates a random ID.
- Upload file is multipart MIME format.
- Intermediate results for upload progress send JavaScript.
- Upload failed as I'm not registered and possibly the input file is incomplete.
I've attached the WS output as plain text. Sorry but it doesn't include the initial page request, just the submission of defaults with the input file you provided. Also set WS to only display HTTP messages. See attached file 'test15-ws-out.txt'
Using curl to accomplish this function appears to be rather complex. You'll have to simulate the JavaScript random ID to execute the "GET /kag_link_upload.php?rnd_id=1275597861022". You may be able to skip the upload progress "GET /kag_set_progress.php?upload_id=151cf1b0cd09e4cbd4fea32148619618" but you'll have to do MIME encoding on the "POST /cgi-bin/kag_upload.pl?upload_id=151cf1b0cd09e4cbd4fea32148619618" for the file. In each case you must set the proper "http.referer", probably provide a "http.user_agent" value which the site likes, and include the proper cookies.
A couple HTTP packets later my upload fails, so the rest of the trace isn't that relavent except in how to handle errors.
This task to fake this web browser app seems non-trivial to me. On
How To Use APPS page it describes a way to upload the file to their FTP server where it will be automatically processed. An FTP transaction would be much easier to implement but you'll have to email them for login details. The other solution is to automate an email and FTP upload which seems to be a bit of a pain compaired to just FTPing a file.