Monday, December 26, 2011

Hacker Monthly Issue 1-19 + 2 bonus chapter


Hacker Monthly is the print magazine version of my favorite site: Hacker News — a social news website wildly popular among programmers and startup founders.

Download all issues (1-19 + 2 bonus chapter) from 2010 - 2011:

Sunday, September 11, 2011

Python - Count Feedburner's Subscriber

Summary: Python script to count subsriber from Feedburner. Before run this script, Feedburner awareness API must be activated. This is script is inspired by Eric Wendelin.
#!/usr/bin/env python

# kuntoaji.blogspot.com

# IMPORTANT: Feedburner awareness API must be activated

# Replace with your own name
feedburner_name = "railsmine"

import urllib
from xml.dom import minidom

try:
  dom = minidom.parse(urllib.urlopen('https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri='+feedburner_name))
  entry = dom.getElementsByTagName('entry')[0]
  count = entry.getAttribute('circulation')
  print "total subscriber:",count
except:
  print "Oops! Something went wrong. Check your feedburner's name or your internet connection."

PHP - Redirect Malicious IP Address

<?php 
/**
http://kuntoaji.blogspot.com
*/

/* Replace this with your IP address.. */
$malicious_ip = '127.0.0.1'

if ($_SERVER['REMOTE_ADDR'] == $malicious_ip) {
header("Location: http://www.example.com/");
}
?>

Popular Posts