echoip/index.html

88 lines
2.5 KiB
HTML
Raw Normal View History

2012-11-19 19:50:32 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
2014-01-26 21:58:16 +01:00
<title>What is my IP address? &mdash; ifconfig.co</title>
2012-11-19 19:50:32 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2014-01-26 21:58:16 +01:00
<meta name="description" content="What is my IP address?">
2012-11-27 10:59:01 +01:00
<link href="//fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
2015-09-17 20:57:27 +02:00
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
2012-11-21 14:04:43 +01:00
<style>
2016-04-15 20:14:16 +02:00
html, .pure-g [class *= "pure-u"] {
2012-11-25 13:30:39 +01:00
font-family: "Oswald", sans-serif;
2016-04-15 20:14:16 +02:00
font-size: 15pt;
2012-11-21 14:04:43 +01:00
}
2016-04-15 20:14:16 +02:00
pre {
2012-11-25 13:30:39 +01:00
font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
2016-04-15 20:14:16 +02:00
font-size: 12pt;
2014-01-26 21:58:16 +01:00
}
2016-04-15 20:14:16 +02:00
body {
2014-01-26 21:58:16 +01:00
margin-left: auto;
margin-right: auto;
2016-04-15 20:14:16 +02:00
max-width: 80%;
2016-03-08 23:55:41 +01:00
}
2014-01-26 21:58:16 +01:00
.ip {
border: 1px solid #cbcbcb;
background: #f2f2f2;
font-size: 36px;
}
2016-04-15 20:14:16 +02:00
#footer {
font-size: 12pt;
}
2012-11-21 14:04:43 +01:00
</style>
2012-11-19 19:50:32 +01:00
</head>
<body>
2016-04-15 20:14:16 +02:00
<div class="pure-g">
<div class="pure-u-1-1">
2014-01-26 21:58:16 +01:00
<h1>What is my IP address?</h1>
<p><code class="ip">{{ .IP }}</code></p>
2016-04-15 20:14:16 +02:00
<p>Multiple command line HTTP clients are supported,
including <a href="https://curl.haxx.se/">curl</a>, <a href="https://www.gnu.org/software/wget/">GNU
Wget</a>
and <a href="https://www.freebsd.org/cgi/man.cgi?fetch(1)">fetch</a>.</p>
</div>
</div>
<div class="pure-g">
<div class="pure-u-1-2">
<p>CLI examples:</p>
<pre>
$ curl ifconfig.co
{{ .IP }}
$ wget -qO- ifconfig.co
{{ .IP }}
$ fetch -qo- http://ifconfig.co
{{ .IP }}
</pre>
<p>Country lookup:</p>
<pre>
$ http ifconfig.co/country
{{ .Country }}
</pre>
</div>
<div class="pure-u-1-2">
<p>JSON output:</p>
<pre>
$ http --json ifconfig.co
HTTP/1.1 200 OK
Content-Length: 61
Content-Type: application/json
Date: Fri, 15 Apr 2016 17:26:53 GMT
{
"country": "{{ .Country }}",
"ip": "{{ .IP }}"
}
</pre>
2012-11-25 13:30:39 +01:00
</div>
2012-11-21 14:04:43 +01:00
</div>
2016-04-15 20:14:16 +02:00
<div class="pure-g">
<div class="pure-u-1-1" id="footer">
<p>To force IPv4 lookup you can use the <a href="http://v4.ifconfig.co">v4 subdomain</a> (<a href="http://v6.ifconfig.co">or v6 for IPv6</a>).</p>
</div>
2016-03-06 07:10:58 +01:00
</div>
2016-04-15 20:14:16 +02:00
<a href="https://github.com/martinp/ipd"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
2012-11-19 19:50:32 +01:00
</body>
</html>