curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.I have actually used cURL in a few projects now and I am very impressed with it's rich set of features and reliability to automate tasks. I won't go over every possible use for curl, but I'll show one example of how I have used cURL in a past project.
I recently setup a text messaging alert using Google's SMS system and Microsoft Outlook. Based on certain types of messages, Outlook will kick off a batch file, that contains one command:
curl -d mobile_user_id="555-555-1234" -d carrier="ATT" -d text="TEXT MESSAGE DATA"In the command above, all of the -d parameters are post parameters that will be sent to the Google SMS site and they are fairly self explanatory. After the parameters, we have the URL http://www.google.com/sendtophone which is where the Google SMS form is located.
-d gl="US" -d hl="en" -d client="navclient-ffsms" -d from="" -d source="" -d c="1"
http://www.google.com/sendtophone
If you are looking for other ways to use cURL, check out their manual.
0 comments:
Post a Comment