I have this script that makes an image that shows your AIM online/offline status and shows users ip and makes it into a png
here it is
PHP Code:
<?php $AIMname = "Angry *** Eaters"; // Your AIM/AOL username $ip = $_SERVER['REMOTE_ADDR']; $port = $_SERVER['REMOTE_PORT']; $iptxt = "Your ip is $ip"; $statfile1 = "[url="http://www.the-server.net/osi3/aim/"]http://www.the-server.net/osi3/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt[/url]"; // Don't touch any of the lines below, unless you know what your doing $statfile2 = "[url="http://www.eliott-ness.com:2324/aim/"]http://www.eliott-ness.com:2324/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt[/url]"; $statfile3 = "[url="http://mightymichelob.tcworks.net:8080/aim/"]http://mightymichelob.tcworks.net:8080/aim/".$AIMname."/onurl=www.s91276774.onlinehome.us/online.txt/offurl=www.s91276774.onlinehome.us/offline.txt[/url]"; $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 (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 $prebackcolor = imagecolorallocate($img_disp,0,0,0); // Assign the background color $backcolor = imagecolortransparent($imgdisp,$prebackcolor) // Make the bg transparent, if the page is alone, make it black $textcolor = imagecolorallocate($img_disp,255,255,255); // 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); // Put the text into the image with the color imagestring($img_disp,10,5,30,$onoff,$textcolor); // ~ imagestring($img_disp,10,5,55,$disp,$textcolor); // ~ imagestring($img_disp,10,5,80,$iptxt,$textcolor); // ~ header("Content-type: image/png"); imagepng($img_disp); // Draw the image imagedestroy($img_disp); // Delete the image from the server's memory ?>
when i upload it i get Parse error: parse error in /home/pridebmx/public_html/sig2.php on line 36
I had a quick look and didn't see anything, but it might be that your AIM name has spaces in it, try replacing those with %20... then tell me what happens
__________________
God save us from the religious fanatics
<?php
$AIMname = "catelyest"; // Your AIM/AOL username
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$iptxt = "Your ip is $ip";
if(!isset($disp)) {
$disp = 25;
}
$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";
$status = file($statfile1);
$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 ($disp < strlen($iptxt)) {
$width = strlen($iptxt) * 9 + 16; // Count how many characters need to be displayed, and change the width accordingly
}
else{
$width = $disp * 9 + 16; // Same as above..
}
$img_disp = imagecreate($width,100); // Create the image
$prebackcolor = imagecolorallocate($img_disp,0,0,0); // Assign the background color
$backcolor = imagecolortransparent($img_disp,$prebackcolor); // Make the bg transparent, if the page is alone, make it black
$textcolor = imagecolorallocate($img_disp,0,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); // Put the text into the image with the color
imagestring($img_disp,10,5,30,$onoff,$textcolor); // ~
imagestring($img_disp,10,5,55,$disp,$textcolor); // ~
imagestring($img_disp,10,5,80,$iptxt,$textcolor); // ~
header("Content-type: image/png");
imagepng($img_disp); // Draw the image
imagedestroy($img_disp); // Delete the image from the server's memory
?>
if(empty($_GET['aim'])) {
die('Sorry, you must enter your AIM/AOL name');
}
$AIMname = $_GET['aim']; // Your AIM/AOL username
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$iptxt = "Your ip is $ip";
if(!isset($disp)) {
$disp = 5;
}
$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";
$status = file($statfile1);
$AIMname = ucfirst(strtolower($AIMname));
$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 ($disp < strlen($iptxt)) {
$width = strlen($iptxt) * 9 + 16; // Count how many characters need to be displayed, and change the width accordingly
}
else{
$width = $disp * 9 + 16; // Same as above..
}
$img_disp = imagecreate($width,80); // Create the image