Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Darren Paul Griffith http://madphilosopher.ca/

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Python CGI script to display client's IP address

When run as a cgi script, this will print the client's IP address.

   1  
   2  import cgi
   3  import os
   4  
   5  print "Content-type: text/html"
   6  print ""
   7  
   8  print cgi.escape(os.environ["REMOTE_ADDR"])
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS