<?php include_once("functions.php"); $sign = !isset($_GET['s']) ? 1 : $_GET['s']; $uname = !isset($_GET["name"]) ? "None" : $_GET['name']; // Connection & Website Settings $ftpad = "ip-adress";//Write IP Adress for server FTP $ftpuser = "username";//Write username for server FTP $ftppass = "pass";//write password for FTP server $comm = "SAMP"; $weburl = "www.zbsamp.com"; $usersdir = "/scriptfiles";//Where are accounts... // $ftpcon = ftp_connect($ftpad,21) or die("ERROR"); $login = ftp_login($ftpcon,$ftpuser,$ftppass); $uname = ""; * * * *$ime = $_GET['name']; ftp_pasv($ftpcon,true); $fhandle = fopen("tempsign_".hash('sha256',"$ime").".tmp","w+ "); ftp_fget($ftpcon,$fhandle,"$usersdir/$ime.ini",FTP_ASCII); $str = parse_ini_file2("tempsign_".hash('sha256',"$ime"). ".tmp"); fclose($fhandle); * * * *$skin = $str['pSkin'];//Definition of players skin in .ini file $rImg = ImageCreateFromPNG("./signs/1.png");//Signature piceture if (file_exists("./signs/skins/$skin.jpg")) { * *$skinImg = ImageCreateFromjpeg("./signs/skins/$skin.jpg");//Create piceture of players skin in signature } else { * *$skinImg = ImageCreateFromjpeg("./signs/skins/0.jpg");//else if skin doesen't exist } * $cor_black = imagecolorallocate($rImg,0,0,0); $cor_blue = imagecolorallocate($rImg,0,0,255); $cor_lblue = imagecolorallocate($rImg,30,144,255); $cor_green = imagecolorallocate($rImg,69,139,116); $cor_red = imagecolorallocate($rImg,220,20,65); $cor_wh = imagecolorallocate($rImg,255,255,255); if(ftp_size($ftpcon,"$usersdir/$ime.ini") == -1 || $ime == "None")//Checks if player account exist { * * echo "<center><br/><br/><br/><br/><font color='#FF3333'>That player doesen't exist<br/><br/></font></center>"; return 1; } else//if exist { ftp_pasv($ftpcon,true); $fhandle = fopen("tempsign_".hash('sha256',"$ime").".tmp","w+ "); ftp_fget($ftpcon,$fhandle,"$usersdir/$ime.ini",FTP_ASCII); $str = parse_ini_file2("tempsign_".hash('sha256',"$ime"). ".tmp"); fclose($fhandle); imagettftext($rImg,11,0,127,48,$cor_wh,"gothicb.TT F",urldecode($ime));//Players name imagettftext($rImg,11,0,139,66,$cor_wh,"gothicb.TT F",urldecode($str['pLevel'])); * * * * * * * *imagettftext($rImg,11,0,172,85,$cor_wh,"gothicb.T TF",urldecode($str['pExp'])); * * * * * * * *imagettftext($rImg,11,0,140,104,$cor_wh,"gothicb. TTF",urldecode($str['pDeaths'])); * * * * * * * *imagettftext($rImg,11,0,310,67,$cor_wh,"gothicb.T TF",urldecode($str['pTimeOnline'])); * * * * * * * *imagettftext($rImg,11,0,313,85,$cor_wh,"gothicb.T TF",urldecode($str['pKills'])); * * * * * * * *imagettftext($rImg,11,0,286,104,$cor_wh,"gothicb. TTF",urldecode($str['pRatio'])); * * * * * * * *imagecopymerge($rImg, $skinImg, 6,6,0,0,80,100,100); //Writes players information on signature } ftp_close($ftpcon); unset($str); unset($ftpad); unset($ftpuser); unset($ftppass); unset($ftpcon); unset($login); header('Content-type: image/png'); imagepng($rImg); * * * *imagepng($skinImg); ?>
If it's php code then it's give u some errors or warnings please write it
|