i did the PHP sig but it doesnt work i get an erro can u help me!
http://www.collide.elementfx.com/sig.php
thats the link
http://www.collide.elementfx.com/sig.php
thats the link
<?php
include('functionsVariables.inc.php');
############################################
## Set variables for the Winamp song file ##
############################################
$song = $_GET['song'];
$filename = 'winamp.txt';
$maxchar = 50;
$mtime = filemtime($filename);
$timestamp = time();
$timeout = $timestamp - 480;
###################################################
## Check if a song hasn't been played in a while ##
###################################################
if ($mtime < $timeout) {
if (@implode('',@file($filename)) != "Winamp is currently turned off.") {
$handle = fopen($filename, 'w');
fwrite($handle, "Winamp is currently off.");
fclose($handle);
}
}
############################################################################
## The Winamp info sender sends the song to: ##
## nedren.com/signature/?hiddensongnameinurl=[b]Song Name Here[/b] ##
## This script then records it in a file if that GET['value'] is present. ##
############################################################################
if(isset($_GET['hiddensongnameinurl'])) {
$playsHandle = fopen('songPlays.txt', "r");
$songPlays = fread($playsHandle, filesize('songPlays.txt'));
fclose($playsHandle);
$songPlays++;
$playsHandle = fopen('songPlays.txt', "w");
fwrite($playsHandle, $songPlays);
@fclose($playsHande);
if(is_writable($filename)) {
if(!$handle = fopen($filename, 'w')) {
echo '<b>Error:</b> Cannot write to file Winamp text file.';
die();
}
if(!fwrite($handle, stripslashes($song))) {
echo '<b>Error:</b> Cannot write to file Winamp text file.';
die();
}
fclose($handle);
}
#############################################
## Else if song is not being sent/recorded ##
#############################################
} else {
########################################
## Get the number of total song plays ##
########################################
$playsHandle = fopen('songPlays.txt', "r");
$songPlays = fread($playsHandle, filesize('songPlays.txt'));
fclose($playsHandle);
##############################################
## Load the server's uptime and load values ##
##############################################
$loadHandle = fopen('load.txt', "r");
$serverLoad = fread($loadHandle, filesize('load.txt'));
if (!$serverLoad) {
$serverLoad = '[Down]';
} else {
fclose($loadHandle);
}
$uptimeHandle = fopen('uptime.txt', "r");
$serverUptime = fread($uptimeHandle, filesize('uptime.txt'));
if (!$serverUptime) {
$serverUptime = '[Down]';
} else {
fclose($uptimeHandle);
}
// Clean up the server's uptime. It's returned in a weird format, so yea.. :-/
$serverUptime = str_replace(',', '-', $serverUptime);
$serverUptime = str_replace(' ', ' ', $serverUptime);
$serverUptime = str_replace('-', ' -', $serverUptime);
// $serverUptime = str_replace('- ', '-', $serverUptime);
###########################
## Get whatpulse shiet. ##
###########################
$mystats = UserStats(172562); // Whatpulse function
########################
## Make actual image ##
########################
header("Content-type: image/gif");
$image = imagecreatetruecolor(425, 150);
$image2 = imagecreatefromgif('http://img.photobucket.com/albums/v429/omei333/fdgs.gif');
imagecopy($image, $image2, 0, 0, 0, 0, 450, 150);
############################
## Make colors for image ##
############################
$red = imagecolorallocate($image, 231, 180, 180);
$green = imagecolorallocate($image, 180, 220, 180);
$white = imagecolorallocate($image, 255, 255, 255);
#############
## Borders ##
#############
imageline($image, 1, 1, 423, 1, $white);
imageline($image, 1, 148, 423, 148, $white);
imageline($image, 1, 1, 1, 149, $white);
imageline($image, 423, 1, 423, 148, $white);
##############################################
## Create somestrings to be placed on image ##
##############################################
$font = arial.tff
$font2 = arial.tff
$font3 = arial.tff
$mouse = number_format($mystats['TotalMouseClicks']);
$keys = number_format($mystats['TotalKeyCount']);
$curSong = @implode('',@file($filename));
#############################
## x10Hosting related text ##
#############################
imagettftext($image, 7, 0, 68, 46, $white, $font, "Server Load:");
imagettftext($image, 7, 0, 126, 46, $white, $font2, $serverLoad);
imagettftext($image, 7, 0, 165, 46, $white, $font, "Uptime:");
imagettftext($image, 7, 0, 204, 46, $white, $font2, $serverUptime);
$status = serviceStatus(80);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 10, 63, $white, $font, "HTTP Server:");
imagettftext($image, 7, 0, 71, 63, $color, $font2, $status);
$status = serviceStatus(3306);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 10, 78, $white, $font, "MySQL Server:");
imagettftext($image, 7, 0, 75, 78, $color, $font2, $status);
$status = serviceStatus(53);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 110, 63, $white, $font, "DNS Server:");
imagettftext($image, 7, 0, 164, 63, $color, $font2, $status);
$status = serviceStatus(110);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 110, 78, $white, $font, "POP3 Server:");
imagettftext($image, 7, 0, 169, 78, $color, $font2, $status);
$status = serviceStatus(22);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 204, 63, $white, $font, "SSH Server:");
imagettftext($image, 7, 0, 257, 63, $color, $font2, $status);
$status = serviceStatus(21);
if ($status == 'Online') { $color = $green; } else { $color = $red; }
imagettftext($image, 7, 0, 204, 78, $white, $font, "FTP Server:");
imagettftext($image, 7, 0, 257, 78, $color, $font2, $status);
imagettftext($image, 7, 0, 300, 43, $white, $font3, "<= 70.86.136.178");
###########################
## Personal related text ##
###########################
imagettftext($image, 7, 0, 55, 103, $white, $font, "Username:");
imagettftext($image, 7, 0, 108, 103, $white, $font2, "Derek");
imagettftext($image, 7, 0, 155, 103, $white, $font, "Country:");
imagettftext($image, 7, 0, 197, 103, $white, $font2, "United States");
imagettftext($image, 7, 0, 10, 120, $white, $font, "Key Strokes:");
imagettftext($image, 7, 0, 68, 120, $white, $font2, $keys);
imagettftext($image, 7, 0, 129, 120, $white, $font, "Mouse Clicks:");
imagettftext($image, 7, 0, 195, 120, $white, $font2, $mouse);
imagettftext($image, 7, 0, 10, 136, $white, $font, "Listening To:");
imagettftext($image, 7, 0, 71, 136, $white, $font2, $curSong);
// Random string array comes from included file.
$randSayingKey = array_rand($randSayings);
$arrow = '<=';
$saying = $randSayings[$randSayingKey];
imagettftext($image, 7, 45, 297, 85, $white, $font3, $arrow);
if ($randSayingKey == '0') {
imagettftext($image, 7, 0, 304, 64, $white, $font3, $saying);
} else {
imagettftext($image, 7, 0, 304, 79, $white, $font3, $saying);
}
imagettftext($image, 6, 90, 420,145,
$white,$font3, "http://collide.elementfx.com");
##############
## PHP text ##
##############
// PHP random array comes from included file.
$randKey = array_rand($randFunctions);
$phpFunction = $randFunctions[$randKey]['Name'];
$phpDescription = $randFunctions[$randKey]['Description'];
imagettftext($image, 6, 0, 302, 114, $white, $font, $phpFunction);
imagettftext($image, 5, 0, 304, 122, $white, $font2, $phpDescription);
$php = '<= I <3 PHP';
imagettftext($image, 7, 90, 405, 85, $white, $font3, $php);
#############################
## Output image to browser ##
#############################
imagegif($image);
########################################################################################
## Destroy image from memory. I don't want to fill up the server's ram, now do I? ;-) ##
########################################################################################
imagedestroy($image);
imagedestroy($image2);
}
?>
<?php
function serviceStatus($port) {
$handle = @fsockopen('70.86.136.178', $port, $errno, $errstr, 30);
if (!$handle) {
$string = 'Down';
} else {
$string = 'Online';
@fclose($handle);
}
return $string;
}
function UserStats($userid) {
$WhatPulseStats = array();
$stat_types = array("UserID", "AccountName", "Country",
"DateJoined", "Homepage", "LastPulse",
"Pulses", "TotalKeyCount", "TotalMouseClicks",
"AvKeysPerPulse", "AvClicksPerPulse",
"AvKPS", "AvCPS", "Rank", "TeamID",
"TeamName", "TeamMembers", "TeamKeys",
"TeamClicks", "TeamDescription",
"TeamDateFormed", "RankInTeam", "GeneratedTime");
$data = @implode("", file("http://whatpulse.org/api/users/".$userid.".xml"));
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $data, $values, $tags);
xml_parser_free($parser);
foreach ($tags as $key => $val)
{
if ($key == "UserStats")
{
$ranges = $val;
for ($i = 0; $i < count($ranges); $i += 2)
{
$offset = $ranges[$i] + 1;
$len = $ranges[$i + 1] - $offset;
$statsarray = array_slice($values, $offset, $len);
foreach($statsarray as $key => $value)
{
for($i = 0; $i < count($stat_types); $i++)
{
if($value['tag'] == $stat_types[$i])
{
$type = $stat_types[$i];
$WhatPulseStats[$type] = $value['value'];
}
}
}
}
} else {
continue;
}
}
return $WhatPulseStats;
}
// I edited out the random function array and the random string arrays.
$randFunctions = array('Moo');
$randSayings = array('Moo');
?>