2012年6月17日日曜日

DIY checkip

確認君とか、checkip.dyndns.com みたいなのを何となく自作。
#! /usr/bin/env python

import os
print 'content-type:text/plain;'
print
print 'Your IP address is:', os.environ['REMOTE_ADDR']
$ curl http://checkip.kt3k.com/
Your IP address is: 59.106.13.209