Ja, selvfølgelig:
<?php
header("Content-Type: image/gif");
$adresse = htmlentities(file_get_contents("
http://armory.wow-europe.com/ (...)(" ", "+", str_replace("\\", "", $_GET[realm]))."&n=".$_GET[character]),ENT_QUOTES);
$udskift = array("\t", " ", "\r\n", "\r");
$udskiftMed = array(" ", " ", "\n", "\n");
$kildekode = str_replace($udskift, $udskiftMed, $adresse);
$classid = explode("theClassId = ", $kildekode);
$classid = explode(";", $classid[1]);
$raceid = explode("theRaceId = ", $kildekode);
$raceid = explode(";", $raceid[1]);
$char = explode("theCharName = "", $kildekode);
$char = explode(""", $char[1]);
$sex = explode("images/portraits/wow-70/", $kildekode);
$sex = explode("-", $sex[1]);
$guild = explode("<h3>", $kildekode);
$guild = explode("</h3>", $guild[2]);
$level = explode("theLevel = ", $kildekode);
$level = explode(";", $level[1]);
$class = explode("theClassName = "", $kildekode);
$class = explode(""", $class[1]);
$realm = explode("theRealmName = "", $kildekode);
$realm = explode(""", $realm[1]);
$prof1 = explode("<a href="java script: ajaxLink(%22character-skills.xml?%22+ theCharUrl);">", $kildekode);
$prof1 = explode("</a>", $prof1[1]);
$prof1skill = explode("<span>", $kildekode);
$prof1skill = explode("</span>", $prof1skill[9]);
$prof2 = explode("<a href="java script: ajaxLink(%22character-skills.xml?%22+ theCharUrl);">", $kildekode);
$prof2 = explode("</a>", $prof2[2]);
$prof2skill = explode("<span>", $kildekode);
$prof2skill = explode("</span>", $prof2skill[10]);
$talents = explode("<span>", $kildekode);
$talents = explode("</span>", $talents[8]);
if($level[0] < 70)
{
$piclevel = "default";
}
else
{
$piclevel = 70;
}
$overlay = imagecreatefromgif("
http://armory.wow-europe.com/ (...));
$overlay_width = imagesx($overlay);
$overlay_height = imagesy($overlay);
$img = imagecreatefromgif("gfx/background.gif");
imagecopymerge($img, $overlay, 5, 5, 0, 0, $overlay_width, $overlay_height, 100);
$color = imageColorAllocate($img,255,255,255);
$font = imageloadfont("font/dyno.gdf");
$dest_x = 74;
$dest_y = -6;
imageString($img, $font, $dest_x, $dest_y, $char[0], $color);
$font = imageloadfont("font/proggysquare.gdf");
$dest_x = 78;
$dest_y = 26;
imageString($img, $font, $dest_x, $dest_y, "<$guild[0]> $level[0] $class[0], ".str_replace("+", " ", str_replace("\\", "", $_GET[realm])), $color);
$dest_x = 77;
$dest_y = 42;
if($prof1[0] != "" && $prof2[0] != "")
{
imageString($img, $font, $dest_x, $dest_y, "$prof1[0]: $prof1skill[0] $prof2[0]: $prof2skill[0]", $color);
}
elseif($prof1[0] != "" && $prof2[0] == "")
{
imageString($img, $font, $dest_x, $dest_y, "$prof1[0]: $prof1skill[0]", $color);
}
elseif($prof1[0] == "" && $prof2[0] != "")
{
imageString($img, $font, $dest_x, $dest_y, "$prof2[0]: $prof2skill[0]", $color);
}
$dest_x = 11;
$dest_y = 75;
$font = 1;
imageString($img, $font, $dest_x, $dest_y, $talents[0], $color);
function show($valg, $realm, $character)
{
$adresse = htmlentities(file_get_contents("
http://armory.wow-europe.com/ (...)(" ", "+", str_replace("\\", "", $_GET[realm]))."&n=".$_GET[character]),ENT_QUOTES);
$udskift = array("\t", " ", "\r\n", "\r");
$udskiftMed = array(" ", " ", "\n", "\n");
$kildekode = str_replace($udskift, $udskiftMed, $adresse);
$health = explode("<span>", $kildekode);
$health = explode("</span>", $health[11]);
$mana = explode("<span>", $kildekode);
$mana = explode("</span>", $mana[12]);
$armor = explode("this.base = "", $kildekode);
$armor = explode(""", $armor[6]);
$stamina = explode("this.effective = "", $kildekode);
$stamina = explode(""", $stamina[3]);
$intellect = explode("this.effective = "", $kildekode);
$intellect = explode(""", $intellect[4]);
$spirit = explode("this.effective = "", $kildekode);
$spirit = explode(""", $spirit[5]);
$strength = explode("this.effective = "", $kildekode);
$strength = explode(""", $strength[1]);
$agility = explode("this.effective = "", $kildekode);
$agility = explode(""", $agility[2]);
$holy = explode("this.holy = ", $kildekode);
$holy = explode(";", $holy[1]);
$arcane = explode("this.arcane = ", $kildekode);
$arcane = explode(";", $arcane[2]);
$fire = explode("this.fire = ", $kildekode);
$fire = explode(";", $fire[2]);
$nature = explode("this.nature = ", $kildekode);
$nature = explode(";", $nature[2]);
$frost = explode("this.frost = ", $kildekode);
$frost = explode(";", $frost[2]);
$shadow = explode("this.shadow = ", $kildekode);
$shadow = explode(";", $shadow[2]);
$choly = explode("this.holy = ", $kildekode);
$choly = explode(";", $choly[3]);
$carcane = explode("this.arcane = ", $kildekode);
$carcane = explode(";", $carcane[3]);
$cfire = explode("this.fire = ", $kildekode);
$cfire = explode(";", $cfire[3]);
$cnature = explode("this.nature = ", $kildekode);
$cnature = explode(";", $cnature[3]);
$cfrost = explode("this.frost = ", $kildekode);
$cfrost = explode(";", $cfrost[3]);
$cshadow = explode("this.shadow = ", $kildekode);
$cshadow = explode(";", $cshadow[3]);
$critchance = ($choly[0] + $carcane[0] + $cfire[0] + $cnature[0] + $cfrost[0] + $cshadow[0]) / 6;
switch($valg)
{
case "0":
break;
case "1":
return "Health: ".$health[0];
break;
case "2":
return "Mana: ".$mana[0];
break;
case "3":
return "Armor: ".$armor[0];
break;
case "4":
return "Stamina: ".$stamina[0];
break;
case "5":
return "Intellect: ".$intellect[0];
break;
case "6":
return "Spirit: ".$spirit[0];
break;
case "7":
return "Strength: ".$strength[0];
break;
case "8":
return "Agility: ".$agility[0];
break;
case "9":
return "Holy: ".$holy[0];
break;
case "10":
return "Arcane: ".$arcane[0];
break;
case "11":
return "Fire: ".$fire[0];
break;
case "12":
return "Nature: ".$nature[0];
break;
case "13":
return "Frost: ".$frost[0];
break;
case "14":
return "Shadow: ".$shadow[0];
break;
case "15":
return "Crit: ".$critchance[0]."%";
break;
}
}
$font = imageloadfont("font/proggysquare.gdf");
$dest_x = 77;
$dest_y = 58;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 0, 2)), $color);
$dest_x = 77;
$dest_y = 73;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 2, 2)), $color);
$dest_x = 180;
$dest_y = 58;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 4, 2)), $color);
$dest_x = 180;
$dest_y = 73;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 6, 2)), $color);
$dest_x = 293;
$dest_y = 58;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 8, 2)), $color);
$dest_x = 293;
$dest_y = 73;
imageString($img, $font, $dest_x, $dest_y, show(substr($_GET[show], 10, 2)), $color);
imageGIF($img);
?>