igrock has asked for the wisdom of the Perl Monks concerning the following question:
This is an entire session dumped after pushing the button "Upload", but I cant see there any login/password or cookies. Can anybody write a little draft on this script, just to guid me for HTTP-perl programming. I know there is a tool LWP, but the ecsact problems for me is I dont know where I have to put login/password, and when and how I can caught cookies for my login/password. May be this question is more about HTTP programming rather than perl, but at least its about LWP thats a perl liblrary. Thanks.POST /script.php?sid= HTTP/1.1^M Host: Host:8080^M Accept-Encoding: deflate, gzip^M User-Agent: Shockwave Flash^M Connection: Keep-Alive^M Cache-Control: no-cache^M Accept: text/*^M Content-Length: 423^M Content-Type: multipart/form-data; boundary=-------------------------- +-- a37b7eb94a71^M ^M ------------------------------a37b7eb94a71^M Content-Disposition: form-data; name="Filename"^M ^M test.txt^M ------------------------------a37b7eb94a71^M Content-Disposition: form-data; name="Filedata"; filename="file.txt"^M Content-Type: application/octet-stream^M ^M 123qwe ^M ------------------------------a37b7eb94a71^M Content-Disposition: form-data; name="Upload"^M ^M Submit Query^M ------------------------------a37b7eb94a71--^M HTTP/1.1 200 OK^M Date: Tue, 11 Jan 2011 12:18:49 GMT^M Server: Apache^M X-Powered-By: PHP/5.2^M Content-Length: 107^M Keep-Alive: timeout=15, max=100^M Connection: Keep-Alive^M Content-Type: text/html; charset=windows-1251^M ^M <strong>........ ...... .............. ................!</strong> <a h +ref="file/file">................</a>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to upload file on server using POST and login/passwork/cookies?
by Anonymous Monk on Jan 12, 2011 at 03:34 UTC |