<?php // Script created by XxXoldsaltXxX (XxXoldsaltXxX@hotmail.com)
$musicname = "XxXoldsaltXxX"; // [url]www.audiomatch.net[/url] username (the site is usually restricting registration, so please donate)
$AIMname = "XxXoldsaltXxX"; // Your AIM/AOL username
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$iptxt = "Your ip is $ip using port $port ..";
$statfile1 = "http://www.the-server.net/osi3/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt"; // Don't touch any of the lines below, unless you know what your doing
$statfile2 = "http://www.eliott-ness.com:2324/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt";
$statfile3 = "http://mightymichelob.tcworks.net:8080/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt";
$musicfile = "http://www.audiomatch.net/text/".$musicname.".txt";
$status = file($statfile1);
$song = file($musicfile); // Get the current song playing
$header = $AIMname."'s current stats:";
if ( $status[0] == NULL ) { // Due to the unreliability of the stat sites, i put in a few backups :)
$status = file($statfile2);
if ( $status[0] == NULL ) {
$status = file($statfile3);
}
}
if ( $status[0] == NULL ) {
$onoff = "AIM online status: ERROR";
}
if ( $status[0] == '1' ) {
$onoff = "AIM online status: ONLINE";
}
elseif ( $status[0] == '0' ) {
$onoff = "AIM online status: OFFLINE";
}
if ( $song == NULL ){ // Check to see if there is a song currently being played
$disp = "Current jamz: None currently";
}
elseif ($song[1] != NULL) { // Check to see if there is a 2nd line
$song[0] = substr($song[0], 0, -1); // Take the last letter (endline char) out of the first line
$disp = "Current jamz: $song[0] - $song[1]";
}
elseif ($song[1] == NULL) {
$disp = "Current jamz: $song[0]";
}
if (strlen($disp) < strlen($iptxt)) {
$width = strlen($iptxt) * 9 + 16; // Count how many characters need to be displayed, and change the width accordingly
}
else{
$width = strlen($disp) * 9 + 16; // Same as above..
}
$img_disp = imagecreate($width,100); // Create the image
$backcolor = imagecolorallocate($img_disp,0,0,0); // Assign the background color
$textcolor = imagecolorallocate($img_disp,255,0,0); // Assign the text color
imagefill($img_disp,0,0,$backcolor); // Fill the image with the background color
imagestring($img_disp,10,5,5,$header,$textcolor);
imagestring($img_disp,10,5,30,$onoff,$textcolor);
imagestring($img_disp,10,5,55,$disp,$textcolor); // Put the text into the image with the color
imagestring($img_disp,10,5,80,$iptxt,$textcolor);
header("Content-type: image/png");
imagepng($img_disp);
imagedestroy($img_disp);
?>
Please leave some comments or if you find any bugs.
You can use and edit this script as much as you want, just dont forget me
Last edited by XxXoldsaltXxX; 02-04-04 at 02:19 PM.
Reason: bug in the code