A random dynamic banner.
old:
-removed the live link as I accidentally deleted it while trying to edit it-
Just make a php file with it, and edit the stuff you need.
like db info blah
and also add a font.ttf in that directory. figure out the rest of it
this guy inspired me to release this blarghy stuff : View Profile: Squall - RaGEZONE - MMORPG development forums
watch his level go up or not
here's the whatever.png if you want it
note: this has more random functions, but they have been disabled. you can figure them out yourself and add them in
note2: i know that a bunch of it was coded badly
note3: fix the rankings yourself if you want. this was made for a low rate
note4: access it through yoursite.com/thisfile.php?name=yourcharactername
edit:
Try recoding the SQL part to be one section with
Updated :C
You need to download
SQLi should be patched up, and so should the 5 queries
old:
PHP:
<?php
header("Content-type: image/png");
$poop = $_GET['name'];
if (isset($_GET['img'])) {
$charimg = $_GET['img'];
} else {
$charimg = 0;
}
if (isset($_GET['skin'])) {
$skin = $_GET['skin'];
} else {
$skin = 0;
}
$poop = preg_replace("/[^A-Za-z0-9 ]/", '', $poop);
//$dir = "stats/";
$dir = "";
if ($charimg != 0) {
$char = imagecreatefrompng('generate your own character here i\'m not giving you mine');
switch ($skin) {
case 1: $what = "s1_n.png"; break;
case 2: $what = "s2_n.png"; break;
case 3: $what = "s3_n.png"; break;
case 4: $what = "s4_n.png"; break;
default: $what = 'whatever.png'; break;
}
} else {
switch ($skin) {
case 1: $what = "s1.png"; break;
case 2: $what = "s2.png"; break;
case 3: $what = "s4.png"; break;
case 4: $what = "s4.png"; break;
default: $what = "whatever.png"; break;
}
}
$im = imagecreatefrompng($dir.$what);
$text = imagecolorallocate($im, 0, 0, 0);
$text2 = imagecolorallocate($im, 0, 0, 0);
$font = "font.ttf";
if ($charimg != 0) {
imagecopy($im, $char, 415, 175, 0, 0, 100, 100);
} else {
imagettftext($im, 15, 0, 475, 215, $text, $dir."font.ttf", getFame($poop));
}
$x = 0;
imagettftext($im, 15, 0, 160, 66, $text, $dir."font.ttf", $poop);
imagettftext($im, 15, 0, 150, 138, $text, $dir."font.ttf", getGuild($poop));
imagettftext($im, 15, 0, 150, 215, $text, $dir."font.ttf", getClass($poop));
imagettftext($im, 15, 0, 475, 66, $text, $dir."font.ttf", getLevel($poop));
imagettftext($im, 15, 0, 468, 138, $text, $dir."font.ttf", getRank($poop));
imagepng($im);
imagedestroy($im);
function getGuild($poop) {
@mysql_connect("localhost", "root", "") or DIE('Connection Error: '.mysql_error());
@mysql_select_db("sekai");
$idQ = @mysql_query("SELECT `guildid` FROM `characters` WHERE `name` = '".$poop."'") or DIE('Query Error: '.MySQL_ERROR());
$idR = mysql_fetch_row($idQ);
$id = $idR[0];
$gnameQ = @mysql_query("SELECT `name` FROM `guilds` WHERE `guildid` = ".$id) or DIE('Query Error: '.MySQL_ERROR());
$gnameR = mysql_fetch_row($gnameQ);
$gname = $gnameR[0];
if ($gname == null) {
$gname = "No Guild";
}
return $gname;
}
function getClass($poop) {
@mysql_connect("localhost", "root", "") or DIE('Connection Error: '.mysql_error());
@mysql_select_db("konbanwa");
$classidQ = @mysql_query("SELECT `job` FROM `characters` WHERE `name` = '".$poop."'") or DIE('Query Error: '.MySQL_ERROR());
$classidR = mysql_fetch_row($classidQ);
$classid = $classidR[0];
$class = "";
switch ($classid) {
case 0: $class = "Beginner"; break;
case 100: $class = "Swordsman"; break;
case 110: $class = "Fighter"; break;
case 111: $class = "Crusader"; break;
case 112: $class = "Hero"; break;
case 120: $class = "Page"; break;
case 121: $class = "White Knight"; break;
case 122: $class = "Paladin"; break;
case 130: $class = "Spearman"; break;
case 131: $class = "Dragon Knight"; break;
case 132: $class = "Dark Knight"; break;
case 200: $class = "Magician"; break;
case 210: $class = "Wizard F/P"; break;
case 211: $class = "Mage F/P"; break;
case 212: $class = "Archmage F/P"; break;
case 220: $class = "Wizard I/L"; break;
case 221: $class = "Mage I/L"; break;
case 222: $class = "Archmage I/L"; break;
case 230: $class = "Cleric"; break;
case 231: $class = "Priest"; break;
case 232: $class = "Bishop"; break;
case 300: $class = "Archer"; break;
case 310: $class = "Hunter"; break;
case 311: $class = "Ranger"; break;
case 312: $class = "Bowmaster"; break;
case 320: $class = "Crossbowman"; break;
case 321: $class = "Sniper"; break;
case 322: $class = "Marksman"; break;
case 400: $class = "Rogue"; break;
case 410: $class = "Assassin"; break;
case 411: $class = "Hermit"; break;
case 412: $class = "Night Lord"; break;
case 420: $class = "Bandit"; break;
case 421: $class = "Chief Bandit"; break;
case 422: $class = "Shadower"; break;
case 430: $class = "Blade Recruit"; break;
case 431: $class = "Blade Acolyte"; break;
case 432: $class = "Blade Specialist"; break;
case 433: $class = "Blade Lord"; break;
case 434: $class = "Blade Master"; break;
case 500: case 501: $class = "Pirate"; break;
case 508: case 570: case 571: case 572: $class = "Jett"; break;
case 510: $class = "Brawler"; break;
case 511: $class = "Marauder"; break;
case 512: $class = "Buccaneer"; break;
case 520: $class = "Gunslinger"; break;
case 521: $class = "Outlaw"; break;
case 522: $class = "Corsair"; break;
case 530: $class = "Cannoneer"; break;
case 531: $class = "Cannon Trooper"; break;
case 532: $class = "Cannon Master"; break;
case 800: $class = "Manager"; break;
case 900: $class = "GM"; break;
case 910: $class = "Super GM"; break;
case 1000: $class = "Noblesse"; break;
case 1100: case 1110: case 1111: case 1112: $class = "Dawn Warrior"; break;
case 1200: case 1210: case 1211: case 1212: $class = "Blaze Wizard"; break;
case 1300: case 1310: case 1311: case 1312: $class = "Wind Archer"; break;
case 1400: case 1410: case 1411: case 1412: $class = "Night Walker"; break;
case 1500: case 1510: case 1511: case 1512: $class = "Thunder Breaker"; break;
case 2000: $class = "Legend"; break;
case 2001: case 2200: case 2210: case 2211: case 2212: case 2213: case 2214: case 2215: case 2216: case 2217: case 2218: $class = "Evan"; break;
case 2002: case 2300: case 2312: case 2322: $class = "Mercedes"; break;
case 2003: case 2400: case 2410: case 2411: case 2412: $class = "Phantom"; break;
case 2100: case 2110: case 2111: case 2112: $class = "Aran"; break;
case 3000: $class = "Citizen";
}
if ($class == null) {
return "Unhandled ID ".$classid;
}
return $class;
}
function getLevel($poop) {
@mysql_connect("localhost", "root", "") or DIE('Connection Error: '.mysql_error());
@mysql_select_db("sekai");
$lvlQ = @mysql_query("SELECT `level` FROM `characters` WHERE `name` = '".$poop."'") or DIE('Query Error: '.MySQL_ERROR());
$lvlR = mysql_fetch_row($lvlQ);
$lvl = $lvlR[0];
return $lvl;
}
function getFame($poop) {
@mysql_connect("localhost", "root", "") or DIE('Connection Error: '.mysql_error());
@mysql_select_db("world");
$lvlQ = @mysql_query("SELECT `fame` FROM `characters` WHERE `name` = '".$poop."'") or DIE('Query Error: '.MySQL_ERROR());
$lvlR = mysql_fetch_row($lvlQ);
$lvl = $lvlR[0];
return $lvl;
}
function getRank($poop) {
@mysql_connect("localhost", "root", "") or DIE('Connection Error: '.mysql_error());
@mysql_select_db("hello");
$rankQ = @mysql_query("SELECT `name` FROM `characters` WHERE gm < 4 ORDER BY `level` desc, `fame` desc") or DIE('Query Error: '.MySQL_ERROR());
$rank = 0;
while($chars = mysql_fetch_row($rankQ)) {
$rank = $rank + 1;
if ($chars[0] == $poop) {
return $rank;
}
}
return "whatever";
}
?>
-removed the live link as I accidentally deleted it while trying to edit it-
Just make a php file with it, and edit the stuff you need.
like db info blah
and also add a font.ttf in that directory. figure out the rest of it
this guy inspired me to release this blarghy stuff : View Profile: Squall - RaGEZONE - MMORPG development forums
watch his level go up or not
here's the whatever.png if you want it
note: this has more random functions, but they have been disabled. you can figure them out yourself and add them in
note2: i know that a bunch of it was coded badly
note3: fix the rankings yourself if you want. this was made for a low rate
note4: access it through yoursite.com/thisfile.php?name=yourcharactername
edit:
Try recoding the SQL part to be one section with
You must be registered to see links
.
You must be registered to see links
should remove possibilities of sqli
PHP:
<?php
header("Content-type: image/png");
require_once 'meekrodb.2.1.class.php';
DB::$user = 'your beautiful mysql username';
DB::$password = 'your beautiful mysql password';
DB::$dbName = 'your beautiful database name';
$poop = $_GET['name'];
$what = 'whatever.png';
$im = imagecreatefrompng($what);
$text = imagecolorallocate($im, 0, 0, 0);
$results = DB::queryFirstRow("SELECT guildid, job, level, fame FROM characters WHERE name = %s", $poop);
$guildid = $results['guildid'];
$classid = $results['job'];
$level = $results['level'];
$fame = $results['fame'];
if ($guildid == 0) {
$guild = "No Guild";
} else {
$guildQ = DB::queryFirstRow("SELECT name FROM guilds WHERE guildid = %i", $guildid);
$guild = $guildQ['name'];
}
switch ($classid) {
case 0: $class = "Beginner"; break;
case 100: $class = "Swordsman"; break;
case 110: $class = "Fighter"; break;
case 111: $class = "Crusader"; break;
case 112: $class = "Hero"; break;
case 120: $class = "Page"; break;
case 121: $class = "White Knight"; break;
case 122: $class = "Paladin"; break;
case 130: $class = "Spearman"; break;
case 131: $class = "Dragon Knight"; break;
case 132: $class = "Dark Knight"; break;
case 200: $class = "Magician"; break;
case 210: $class = "Wizard F/P"; break;
case 211: $class = "Mage F/P"; break;
case 212: $class = "Archmage F/P"; break;
case 220: $class = "Wizard I/L"; break;
case 221: $class = "Mage I/L"; break;
case 222: $class = "Archmage I/L"; break;
case 230: $class = "Cleric"; break;
case 231: $class = "Priest"; break;
case 232: $class = "Bishop"; break;
case 300: $class = "Archer"; break;
case 310: $class = "Hunter"; break;
case 311: $class = "Ranger"; break;
case 312: $class = "Bowmaster"; break;
case 320: $class = "Crossbowman"; break;
case 321: $class = "Sniper"; break;
case 322: $class = "Marksman"; break;
case 400: $class = "Rogue"; break;
case 410: $class = "Assassin"; break;
case 411: $class = "Hermit"; break;
case 412: $class = "Night Lord"; break;
case 420: $class = "Bandit"; break;
case 421: $class = "Chief Bandit"; break;
case 422: $class = "Shadower"; break;
case 430: $class = "Blade Recruit"; break;
case 431: $class = "Blade Acolyte"; break;
case 432: $class = "Blade Specialist"; break;
case 433: $class = "Blade Lord"; break;
case 434: $class = "Blade Master"; break;
case 500: case 501: $class = "Pirate"; break;
case 508: case 570: case 571: case 572: $class = "Jett"; break;
case 510: $class = "Brawler"; break;
case 511: $class = "Marauder"; break;
case 512: $class = "Buccaneer"; break;
case 520: $class = "Gunslinger"; break;
case 521: $class = "Outlaw"; break;
case 522: $class = "Corsair"; break;
case 530: $class = "Cannoneer"; break;
case 531: $class = "Cannon Trooper"; break;
case 532: $class = "Cannon Master"; break;
case 800: $class = "Manager"; break;
case 900: $class = "GM"; break;
case 910: $class = "Super GM"; break;
case 1000: $class = "Noblesse"; break;
case 1100: case 1110: case 1111: case 1112: $class = "Dawn Warrior"; break;
case 1200: case 1210: case 1211: case 1212: $class = "Blaze Wizard"; break;
case 1300: case 1310: case 1311: case 1312: $class = "Wind Archer"; break;
case 1400: case 1410: case 1411: case 1412: $class = "Night Walker"; break;
case 1500: case 1510: case 1511: case 1512: $class = "Thunder Breaker"; break;
case 2000: $class = "Legend"; break;
case 2001: case 2200: case 2210: case 2211: case 2212: case 2213: case 2214: case 2215: case 2216: case 2217: case 2218: $class = "Evan"; break;
case 2002: case 2300: case 2312: case 2322: $class = "Mercedes"; break;
case 2003: case 2400: case 2410: case 2411: case 2412: $class = "Phantom"; break;
case 2100: case 2110: case 2111: case 2112: $class = "Aran"; break;
case 3000: $class = "Citizen";
}
imagettftext($im, 15, 0, 475, 215, $text, "font.ttf", $fame);
imagettftext($im, 15, 0, 160, 66, $text, "font.ttf", $poop);
imagettftext($im, 15, 0, 150, 138, $text, "font.ttf", $guild);
imagettftext($im, 15, 0, 150, 215, $text, "font.ttf", $class);
imagettftext($im, 15, 0, 475, 66, $text, "font.ttf", $level);
imagettftext($im, 15, 0, 468, 138, $text, "font.ttf", "Removed");
imagepng($im);
imagedestroy($im);
?>
You must be registered to see links
for that.SQLi should be patched up, and so should the 5 queries
Attachments
You must be registered for see attachments list
Last edited: