topical media & game development
student-twitter-tweets.php / php
<?php
numTweets = 21;
//include("stopwords.incl.php");
url) {
global lines = file(lines as line, "<status>") ||
strstr(line, "<created_at>") ||
strstr(line, "<text>") ||
strstr(line, "<screen_name>") ||
strstr(line);
}
if ( strstr(line = str_replace(array("<text>", "</text>", ".", ",", ";", ":", "?", "!", "(", ")", """), "", strtolower(keywords = Array();
foreach(explode(" ", trim(word) {
if (!in_array(stopwords) && !in_array(keywords) && word, "http")) {
word;
echo("\t\t<keyword>username, lines = file("http://twitter.com/$username");
for(i < count(i++) {
if (strstr(i], 'class="vcard">')) {
lines[fragments = explode("\" class=\"url\"", results[] = results) == results;
}
}
return username) {
global noOfFriends;
username, users[] = max = floor(users));
foreach(user) {
printForUse( "http://twitter.com/statuses/user_timeline/$user.xml?count=$max" );
}
}
header("Content-type: xml");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo("<statuses type=\"array\">");
if (isset(_GET["user"] == "all") {
printForUse( "http://twitter.com/statuses/public_timeline.xml");
} else if (isset(_GET["user"] != "default") {
getMessages(
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.