#!/usr/bin/python

##pE-API sample code for getting the basic proxy list
##This will return 3 IP:port combinations

##10/15/2011 
##samurai@psych0tik.net

##all we need is the ability to make HTTP GET requests
import urllib
import json

##this is the URL for all pE-API features
API_URL = "http://proxyElite.net/API/index.php"

##a few IPs to check out
check_ips = ['1.2.3.4','208.52.92.116']

##cycle through them
for ip in check_ips:
	##to request basic info on an IP, add the proxy= parameter with the IP
	proxy_info = urllib.urlopen(API_URL + "?proxy=%s" % (ip) )
	##returned data is a json string
	data = proxy_info.read()
	proxy_data = json.loads(data)
	print proxy_data

