Tag Archives: cURL

How to test a website’s SSL using terminal and cURL

Basic cURL

curl -svo /dev/null http://example.com/

Performance cURL

curl -svo /dev/null https://example.com/ -w "\nContent Type: %{content_type} \
\nHTTP Code: %{http_code} \
\nHTTP Connect:%{http_connect} \
\nNumber Connects: %{num_connects} \
\nNumber Redirects: %{num_redirects} \
\nRedirect URL: %{redirect_url} \
\nSize Download: %{size_download} \
\nSize Upload: %{size_upload} \
\nSSL Verify: %{ssl_verify_result} \
\nTime Handshake: %{time_appconnect} \
\nTime Connect: %{time_connect} \
\nName Lookup Time: %{time_namelookup} \
\nTime Pretransfer: %{time_pretransfer} \
\nTime Redirect: %{time_redirect} \
\nTime Start Transfer: %{time_starttransfer} \
\nTime Total: %{time_total} \
\nEffective URL: %{url_effective}\n" 2>&1

Source: https://curl.haxx.sehttps://support.cloudflare.com/hc/en-us/articles/222971907-Using-cURL-when-Troubleshooting-with-Cloudflare

Mac OS: Tweeting using cURL

Termianl-IconThe cURL function, found on most UNIX based systems, including the Mac OS, is one of the cooler functions that is also simple to use and awesomely powerful when used correctly. Check out my introduction to CURL for more information about some cool things you can do with it.

Recently I found out that it is simple and relatively easy to post new status updates to twitter through the Terminal using cURL. This opens up the doors for using Applescript, BASH or other languages to automate postings if needed.

Continue reading Mac OS: Tweeting using cURL

Mac OS: cURL your way to freedom

 Why cURL?

When we view a website (like this one), your computer’s browser is converting thousands upon thousands of lines of code to display all the images and content you see. Thankfully your browser does all this processing in the background while you wait for a website to load. With modern computers and fiberoptic cable, this is pretty fast. If we didn’t need to convert this code into a visual form for our eyes, just image how much faster a website could load! From there, if we could tell our computer to look at only the data we want, or to perform some automatic task, just think of all the time you could save!

What can it do?

The cURL command, to put it simply, connects your computer to other computers and accesses data using many of the standard file transfer protocols, such as HTTP and FTP. This may not seem like much at first, but apply a few additional commands in conjunction to it to it and you are on your way to taking over the internet.

Continue reading to see how you can use this tool to perform fast multi-site data processing to gather information faster and better.

Continue reading Mac OS: cURL your way to freedom