topical media & game development
student-twitter-admin-xmlfunctions.incl.php / php
<?php
function getFromXML (lines = file(result = Array();
foreach(line) {
if ( strstr(entry = Array();
line);
temp[1];
} else if ( strstr(temp = explode("\"", entry[1] = Array(temp[3], line, "<word>") ) {
line);
temp[1]);
temp[0];
} else if ( strstr(result[] = result;
}
function toXML (result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<emotions type=\"array\">\n";
foreach(entry) {
entry[0]."\">\n";
entry[1][0]."\" green=\"".entry[1][2]."\"/>\n";
entry[2] as result .= "\t\t\t<word>result .= "\t\t</words>\n";
result .= "</emotions>";
return filename, fp1 = @fopen( lines = explode("\n", lines as fp2= fputs( line."
" );
}
fp1 );
}
?>
(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.