curl-users
Re: can curl upload files to geocitites?
Date: Mon, 24 Feb 2003 09:03:16 +0100 (CET)
On Sun, 23 Feb 2003 listbox_8811_at_hotmail.com wrote:
> The attached file is the source for the upload page. I see that the post
> url is: http://geocities.yahoo.com/filemanager/upload and the name of the
> input type is "op-upload". I'm unsure how to enter this to try.
Formfind reports this:
--- FORM report. Uses POST to URL
"http://geocities.yahoo.com/filemanager/upload"
Input: userfile (FILE)
Input: userfile (FILE)
Input: userfile (FILE)
Input: userfile (FILE)
Input: userfile (FILE)
Select: numfiles
One option (name "") = "1"
One option (name "") = "2"
One option (name "") = "3"
One option (name "") = "4"
One option (name "") = "5"
One option (name "") = "6"
One option (name "") = "7"
One option (name "") = "8"
One option (name "") = "9"
One option (name "") = "10"
One option (name "") = "11"
One option (name "") = "12"
One option (name "") = "13"
One option (name "") = "14"
One option (name "") = "15"
One option (name "") = "16"
One option (name "") = "17"
One option (name "") = "18"
One option (name "") = "19"
One option (name "") = "20"
[end of select]
Input: operation=Display (SUBMIT)
Input: op-upload=Upload (SUBMIT)
Input: lowercase (CHECKBOX)
Input: addhtml (CHECKBOX)
--- end of FORM
And this is a multipart form. Use -F extensively, similar to this:
curl -F userfile=@filetoupload -F numfiles=1 -F op-upload=Upload -F
lowercase=CHECKED -F addhtml= http://geocities.yahoo.com/filemanager/upload
(I haven't actually tested this command line)
> I also think that geocities uses cookie based authentication, and I'm not
> sure I handle that in curl.
curl handles cookies fine. Then you just need to login with curl first, and
store the cookies and then make sure that the upload command line uses the
cookies from the login operation.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforgeReceived on 2003-02-24