This script reads and displays the data served at a URL. Options let you choose the data to display (headers, content, real URL), and if you have in your python path, you can display the content in hex.

For example, readurl can show the headers returned by slashdot:

$ readurl -h
Date: Mon, 25 Nov 2002 01:23:15 GMT
Server: Apache/1.3.26 (Unix) mod_gzip/ mod_perl/1.27 mod_ssl/2.8.10 OpenSSL/0.9.6g
X-Powered-By: Slash 2.003000
X-Bender: My life, and by extension everyone else's, is meaningless.
Cache-Control: private
Pragma: private
Content-Type: text/html
Age: 0
Via: HTTP/1.1 (Traffic-Server/4.0.12-A [cMsSf ])

It can’t explain the X-Bender headers, (though others have wondered about them).


readurl: read and display the data at a URL
readurl [OPTS] URL
URL is a full URL, including the scheme, such as
 -h          show the headers
 -c          show the page content
 -x          show the page content in hex
 -u          show the real URL retrieved



Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.