#!/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."
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.
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/");
}
?>
Click Counter with jQuery
Summary: Count every user click "click me!" link
<html>
<head>
<title>Click Counter</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
// http://kuntoaji.blogspot.com
$(function(){
var total_click = 0;
$("#clickMe").click(function(){
total_click = total_click + 1;
$("#counter").text("Total Click: " + total_click);
return false;
});
});
</script>
</head>
<body>
<div id="counter">Total Click: 0</div><br />
<a id="clickMe" href="#">click me!</a>
</body>
</html>
Subscribe to:
Posts (Atom)
Popular Posts
-
scp adalah perintah yang digunakan untuk melakukan copy file antara dua host via network atau jaringan komputer. scp menggunakan ssh untuk t...
-
download file: konfigurasi lan xp.pdf Berikut ini saya akan menjelaskan bagaimana mengkonfigurasi LAN pada sistem operasi windows XP. Saya a...
-
Berikut ini adalah beberapa perintah yang sering digunakan dalam jaringan komputer. 1. ping ping adalah perintah yang digunakan untuk menge...
-
download file: setting ip XP.pdf Konfigurasi IP address dan Subnet mask ini digunakan untuk jaringan LAN yang tidak terhubung ke Internet. 1...
-
Linux has many Window Manager such as KDE, Gnome, XFCE, fluxbox, or IceWM. Every Window Manager is typical. The only thing you need to make ...