/ Published in: PHP

Checks your follower account against 12.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // Retrieve the follower count $xml = file_get_contents('http://api.twitter.com/1/users/show.xml?screen_name=' . $_GET['username']); // If the followers' count is not zero // Your followers, minus Jesus'. $count = $match[1] - 12; // If we've got more than 12. if($match[1] > 12) { echo 'Nice one, ' . $_GET['username'] . '! You have ' . $count . ' more followers than Jesus!'; } else { echo 'Jesus has more followers than me.'; } } } else { ?> <form method="get" action="<?php echo $_SERVER['HTTP_REFERRER']; ?>"> <input id="username" name="username" type="text" value="What's your Twitter username?" /> <input type="submit" value="Let's rock!" /> </form> <?php } ?>
URL: http://vidmarkr.com/twitter.php
Comments
