curl

Displaying 1 - 3 of 3

Time your website speed with simple command line tools

When doing some initial, rough performance evaluation of a website's code, we can use some common tools which should be available on most desktops. Whether on Mac or Windows, you should have access to a command line (Terminal on Mac, git bash or Cygwin bash on Windows) with the regular "Unix" (POSIX) command line tools or GNU versions of them. You should also have 'curl' (and 'wget'), which is non-standard but very common and useful.

In the following examples, replace example.com with your website and page you want to test.

Step 0: ping example.com

...

What's my (external public) IP address (command line)?

The Internet is running out of IP addresses (ipv4, but years after ipv6 came out we still haven't switched over to it). This is realer than Peak Oil. And so most of us are connected to the Internet with an IP address shared with many other people, with many devices seen by the outside world as having one address.

But more locally, behind a router or gateway or firewall, we all have unique addresses and names to identify each other by. But only locally.

And so each of our devices have two or more possible IP addresses. Each computer should have a local IP address, its main...

How to login to any website using Curl from the command line or shell script

There are times you need to scrape/crawl some field on a page but the page requires authentication (logging in). Unless the site is using Basic Auth, where you can have the username and password in the url like http://username:[email protected]/ then you'll need to curl with more sophistication. Besides curl, there are other web tools which you can use on the command line such as links/elinks (elinks is an enhanced version of links which also supports JavaScript to a very limited extent). Links and curl will not execute JavaScript though, so if that's necessary to get...