Skip to content

Instantly share code, notes, and snippets.

@techstiff
techstiff / gist:9487304
Created March 11, 2014 14:48
Check Domain Availability with Python
import urllib2,cookielib
import re
def checkDomain(domain):
site='http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=' + domain
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'Accept-Encoding': 'none',
'Accept-Language': 'en-US,en;q=0.8',
@techstiff
techstiff / gist1
Last active August 29, 2015 13:57
"""
Demo for sharing Code Snippets using Gist
"""
def hello():
print "From Gist !!"
if __name__ == "main":
hello()