perldoc CGI
perl -M
Where to download curl from ?
http://curl.haxx.se/dlwiz/
GENERAL PRINCIPLES :
Now the vendor must have a "webpage" for you to interact with. That
webpage could be generated with a Perl CGI script. It must contain a
form (and, since it must have an "upload" field, it must be a multipart
form). So the vendor publishes a webpage with a form that has an
upload field in it. You use Mechanize (or cURL or whatever) to "fill
out" and submit that form. The form can be password-controlled for
security (using .htaccess or authentication within the script itself,
or both, or some other method (cookies, etc)). The script could be
coded to allow access only from a particular host or IP address, etc.
See the CGI.pm documentation for instructions about how to set up a
file upload form.
It's then up to the target CGI to receive and process the incoming
file. This would usually involve security checks and placement into a
particular directory. Unlike FTP, you have no direct control (on your
end) over what directory the file ends up in (though the CGI could be
configured so that you could pass a directory as a parameter which the
CGI would use).
curl - get a file from an FTP, TELNET, LDAP, GOPHER, DICT,
HTTP or HTTPS server.
-a/--append
(FTP) When used in a ftp upload, this will tell
curl to append to the target file instead of over-
writing it. If the file doesn't exist, it will be
created.
-F/--form
(HTTP) This lets curl emulate a filled in form in
which a user has pressed the submit button. This
causes curl to POST data using the content-type
multipart/form-data according to RFC1867. This
enables uploading of binary files etc. To force the
'content' part to be read from a file, prefix the
file name with an @ sign. Example, to send your
password file to the server, named 'passwd':
curl -F passwd=@/etc/passwd www.passwd.com
Uploading CSV File via Curl
curl --connect-timeout 10 --max-time 120 -s -S \
--form 'email=EMAIL_HERE' --form 'pw=PASSWORD_HERE' \
--form 'project_id=22' --form 'tableName=demoData' \
--form 'data_file=@path/to/data.csv' --form 'type=csv' \
http://sensorbase.org/alpha/upload.php
Uploading XML File via Curl
curl --connect-timeout 10 --max-time 120 -s -S \
--form 'email=EMAIL_HERE' --form 'pw=PASSWORD_HERE' \
--form 'project_id=22' --form 'tableName=demoData' \
--form 'data_file=@path/to/data.xml' --form 'type=xml' \
http://sensorbase.org/alpha/upload.php
SOURCES
http://lecs.cs.ucla.edu/wiki/index.php/Slog_Data_via_HTTP_POST_-_SensorBase.org#Uploading_XML_File_via_Curl
CGI documentation for creating file upload field
using perl to upload files from about.com
http://www.google.com/search?client=opera&rls=en&q=PERL+PACKAGE+CURL&sourceid=opera&ie=utf-8&oe=utf-8
http://curl.haxx.se/libcurl/perl/
http://curl.haxx.se/
http://curl.haxx.se/download.html
http://curl.haxx.se/dlwiz/
http://curl.haxx.se/dlwiz/?type=bin
http://curl.haxx.se/dlwiz/?type=bin&os=Win32
http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-
http://curl.haxx.se/dlwiz/?type=bin&os=Win32&flav=-&ver=2000%2FXP
http://webdesign.about.com/od/htmltags/p/bltags_inputfil.htm
http://webdesign.about.com/od/cgi/a/aa030899.htm
http://www.thescripts.com/forum/thread224757.html
http://www.thescripts.com/forum/login.php
http://www.thescripts.com/forum/login.php?do=lostpw
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=m_blanco<mplcache=2
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!