kostenloser Webspace werbefrei: lima-city


Suche auf lima-city

  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    fatfreddy schrieb:
    Gefällt es dir so besser?
    http://fatfreddy.lima-city.de/pic.php

    dann such bitte in deinem Skript diese Zeile:
    $image=imagecreatefrompng("./cyphrex.png");

    und füge darunter ein:
    imagealphablending($image, true); // setting alpha blending on
    imagesavealpha($image, true); // save alphablending setting (important)


    Dann klaptts auch mit dem Alphakanal. :wink:

    FF


    oh mann das fehlen dieser 2 zeilen haben mich 2 ganze tage genervt - man mags kaum glauben :angel:

    vielen dank!!! :prost:
  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    fatfreddy schrieb:
    Stutz!

    Funktioniert doch: http://cyphrex.lima-city.de/cyphrex.png.php :wink:

    Die Ursache für den Fehler mit dem fehlenden Wert für [int] hab ich schon gefunden.

    FF


    Öhm, da habe ich gestern wohl kurzzeitig einen Knick in der Optik gehabt :P

    Super, dann stimmt jetzt alles (den INT-Fehler habe ich auch gefunden), bis auf: aus irgend einem Grund macht er aus dem schicken, klaren, hintergrund-transparenten PNG (hier die Datei ohne php zum Vergleich: http://cyphrex.lima-city.de/cyphrex/cyphrex.png) dieses verzerrte Etwas... Ein Kumpel der mir versucht hat soweit er kann zur Seite zu stehen hat es auch nicht hinbekommen mit einem anders gecodeten Script (er hatte da eine Vorlage von sich) den Fehler zu beheben - weiss jemand was da falsch läuft (macht das Script die Bildanzeige kaputt oder ist was an der PNG korrupt)?
  • in: Verdienstmöglichkeiten

    geschrieben von cyphrex

    drafed-map schrieb:
    Du bekommst 5 Gulden, wenn du ein Thema erstellst. 2 wenn dir jemand antwortet, der selbst 5 Gulden dafür bekommt, und 7 wenn du darin nochmal was schreibst.



    mfg drafed-map


    Eben nicht - oder übersehe ich etwas? Aus meinem Guldenlog:

    Beitrag geschrieben  	 12:43, 13.8.2009  	 +5
    Antwort erhalten 	12:43, 13.8.2009 	+2
    Antwort erhalten 	12:41, 13.8.2009 	+2
    Thema geschrieben 	12:37, 13.8.2009 	+5
    Alles im selben, von mir erstellten Thema.

    edit: Ach, die sind aufgesplittet die 7 Gulden, sehe ich das richtig? Man bekommt also 5+2 Gulden wenn man auf eine Antwort im eigenen Thread erneut antwortet, verstehe :) Sorry, hatte das übersehen
  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    Huiii, ich bin aufgeregt - das sieht ja schon fast so aus wie es soll :)

    Also bei mir sah die Struktur so aus:

    /html/
     |
     |
     |_Fonts/
     |    |_sans.ttf
     |    |_diablo.ttf
     |
     |_ cyphrex/
          |_cyphrex.png
          |_cyphrex.png.php5
    (war im Tutorial so beschrieben, dass die Dateiendung .php5 sein sollte und das vor der Dateiendung dann in die Adresszeile des Browsers als http://host.domain/ordner/cyphrex.png eingegeben werden könne) - das ist wichtig, da ich die .png Endung brauche um das Ding in den [img]-bbCode-Tag setzen zu können

    Funktionierte aber nicht. Auch eine Änderung in

    /html/
     |
     |_cyphrex.png.php5 bzw. cyphrex.png.php
     |
     |_Fonts/
     |    |_sans.ttf
     |    |_diablo.ttf
     |
     |_ cyphrex/
          |_cyphrex.png
    (jeweils auch mit Veränderung von $image = ImageCreateFromPNG("./cyphrex/cyphrex.png"); in ./cyphrex.png und zurück) brachte kein Ergebnis :frown:
  • in: Verdienstmöglichkeiten

    geschrieben von cyphrex

    Huhu :wave:


    Hoffe mir wird das als Neuling verziehen und ich werde nicht als Klugschei**er beschimpft :wink: Im Hilfetopic Gulden>Verdienstmöglichkeiten steht, dass man 7 Gulden pro eigenen Beitrg im eigenen Thema bekommt - es sind aber nur 5 (jedenfalls bei mir :angel: ) http://www.lima-city.de/2008/gulden/#verdienst

    Hoffe ich bin hier richtig, wünsche noch allen die hier reinschauen einen angenehmen Tag,

    Besten Gruß
    cyphrex
  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    Ja gerne, es zeigt mir halt bisher nur die png: http://cyphrex.lima-city.de/cyphrex/cyphrex.png

    Es sollte jedoch eigentlich so aussehen: http://www.ls.dunaicapa.hu/149.jpg (das ist die gleiche png datei). der php-code liegt hier: http://www.ls.dunaicapa.hu/exphp5.php?id=149, und den möchte ich nun auf meinem webspace hosten... schön dass es helfer wie dich gibt, sonst wär ich schon längst verzweifelt :prost:
  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    Hmm, ändert leider nichts. Mich irritiert dieser "html" Ordner sehr, den man als vorgeschalteten Ordner im Filemanager nicht, via FTP Uploader jedoch sehr wohl sieht. wenn ich die Dateien nicht in den html-Ordner packe werden sie im Filemanager auch nicht angezeigt... Daher bin ich dann auch unsicher ob ich bei den Schriften ./html/Fonts/font.ttf oder ./Fonts/font.ttf eingeben soll. Wie dem jedoch im Eneffekt auch sei, es will einfach nicht klappen :frown:

    Kannst du oder jemand anders mir verifizieren dass die .htaccess mit dem einzigen Inhalt

    Options MultiViews
    (wie in dem o.g. Tutorial beschrieben --> ganz am Ende des ersten Posts) vom Server hier angenommen wird? Soweit ich das verstehe ist das nämlich der Dreh- und Angelpunkt für das funktionieren der Umwandlung von php in png (oder so :angel: )
  • in: PHP5 + .htaccess sollen mir bitte XML-Daten liefern - aber wie?

    geschrieben von cyphrex

    Hallo liebe Community!

    Ich versuche folgendes Tutorial zu befolgen: http://forums.d2jsp.org/index.php?showtopic=22792192&f=272

    Dazu habe ich jetzt schon die .php fertig bekommen (durch einen Generator, ich selbst kenne mich leider mit PHP im Grunde gar nicht aus). In dem Tutorial steht ich muss eine .htaccess Datei mit dem Inhalt
    Options MultiViews

    anlegen. Habe ich gemacht. dann habe ich meinen php-Code bearbeitet, und meine PNG in den selben Ordner hochgeladen. Trotzdem mag er die PHP-Daten nicht mit der PNG verknüpfen. Kann mir bitte jemand helfen, ich wäre ja sooo dankbar :thumb:

    Beste Grüße

    cyphrex


    PS: Hier die php

    <?php
    header("Content-type: image/png");
    header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
    header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
    header("Pragma: no-cache");
    
    
    	$data = simplexml_load_file("http://ladderslasher.d2jsp.org/xmlChar.php?i=151898");
    
    	$carr	= array("none", "Fighter", "Barbarian", "Rogue", "Magician", "Guardian", "Samurai", "Paladin", "Monk", "Ninja", "Warlock", "Headhunter", "Alchemist");
    	$pwarr	= array("sword"		=> array(0, 0),
    					"club"		=> array(0, 0),
    					"axe"		=> array(0, 0),
    					"dagger"	=> array(0, 0),
    					"staff"		=> array(0, 0),
    					"longsword" => array(0, 0),
    					"warhammer" => array(0, 0),
    					"battleaxe" => array(0, 0),
    					"spear"		=> array(0, 0),
    					"polearm"	=> array(0, 0)
    			);
    	$pcarr	= array("ice"		=> array(0, 0),
    					"fire"		=> array(0, 0),
    					"light"		=> array(0, 0),
    					"wind"		=> array(0, 0),
    					"earth"		=> array(0, 0),
    					"wild"		=> array(0, 0),
    					"heal"		=> array(0, 0),
    					"focused"	=> array(0, 0),
    			);
    	$psarr	= array("fish"		=> array(0, 0),
    					"cook"		=> array(0, 0),
    					"glyph"		=> array(0, 0),
    					"mute"		=> array(0, 0),
    			);
    	$charr	= array();
    
    	$exp = $data->exp;
    	$exp = (int)$exp;
    	$cid = $data->classid;
    	$cid = (int)$cid;
    
    	if((string)$data->core==0) $core = "Softcore";
    	else $core = "Hardcore";
    
    	$pw = $data->wprof;
    	$pc = $data->cprof;
    	$ps = $data->sprof;
    
    	if($pw!="") {
    	$w = explode(";", $pw);
    		for($i=0;$i<count($w);$i++) {
    		$in = explode(",", $w[$i]);
    			$f=0;
    			foreach($pwarr as $key => $value) {
    				if($in[0]==$f) {
    					@$pwarr[$key][0] = (int)$in[1];
    					@$pwarr[$key][1] = (int)$in[2];
    				}
    				$f++;
    			}
    		}
    	}
    
    	if($pc!="") {
    	$c = explode(";", $pc);
    		for($i=0;$i<count($c);$i++) {
    		$in = explode(",", $c[$i]);
    			$f=0;
    			foreach($pcarr as $key => $value) {
    				if($in[0]==$f) {
    					@$pcarr[$key][0] = (int)$in[1];
    					@$pcarr[$key][1] = (int)$in[2];
    				}
    				$f++;
    			}
    		}
    	}
    
    	if($ps!="") {
    	$s = explode(";", $ps);
    		for($i=0;$i<count($s);$i++) {
    		$in = explode(",", $s[$i]);
    			$f=0;
    			foreach($psarr as $key => $value) {
    				if($in[0]==$f) {
    					@$psarr[$key][0] = (int)$in[1];
    					@$psarr[$key][1] = (int)$in[2];
    				}
    				$f++;
    			}
    		}
    	}
    
    	$charr["name"]	= (string)$data->name;
    	$charr["class"] = (string)$carr[$cid+1];
    	$charr["core"]	= $core;
    	$charr["lvl"]	= (string)$data->level;
    	$charr["kil"]	= (string)$data->kills;
    	$charr["dea"]	= (string)$data->deaths;
    	$charr["lac"]	= (string)$data->lastaction;
    	$charr["str"]	= (string)$data->strength;
    	$charr["dex"]	= (string)$data->dexterity;
    	$charr["vit"]	= (string)$data->vitality;
    	$charr["int"]	= (string)$data->intelligence;
    	$charr["hpm"]	= (string)$data->hpmax;
    	$charr["mpm"]	= (string)$data->mpmax;
    	$charr["mqa"]	= (string)$data->mqattempts;
    	$charr["mqp"]	= (string)$data->mqpasses;
    	$charr["exp"]	= $exp;
    	$charr["w"]		= $pwarr;
    	$charr["c"]		= $pcarr;
    	$charr["s"]		= $psarr;
    
    function perc($input, $edge=100) {
    	$input = ($input/71)*$edge;
    	if($input>$edge)$input=$edge;
    	return (int)$input;
    }
    
    $table = array(
    	"[name]"=>$charr["name"],
    	"[core]"=>$charr["core"],
    	"[class]"=>$charr["class"],
    	"[level]"=>$charr["lvl"],
    	"[exp]"=>$charr["exp"],
    	"[kil]"=>$charr["kil"],
    	"[dea]"=>$charr["dea"],
    	"[str]"=>$charr["str"],
    	"[dex]"=>$charr["dex"],
    	"[vit]"=>$charr["vit"],
    	"[hpm]"=>$charr["hpm"],
    	"[mpm]"=>$charr["mpm"],
    	"[mqa]"=>$charr["mqa"],
    	"[mqp]"=>$charr["mqp"],
    	"[tomq]"=>perc($charr["lvl"]),
    
    	"[sword]"=>$charr["w"]["sword"][0],
    	"[club]"=>$charr["w"]["club"][0],
    	"[axe]"=>$charr["w"]["axe"][0],
    	"[dagger]"=>$charr["w"]["dagger"][0],
    	"[staff]"=>$charr["w"]["staff"][0],
    	"[longsword]"=>$charr["w"]["longsword"][0],
    	"[warhammer]"=>$charr["w"]["warhammer"][0],
    	"[battleaxe]"=>$charr["w"]["battleaxe"][0],
    	"[spear]"=>$charr["w"]["spear"][0],
    	"[polearm]"=>$charr["w"]["polearm"][0],
    
    	"[ice]"=>$charr["c"]["ice"][0],
    	"[fire]"=>$charr["c"]["fire"][0],
    	"[light]"=>$charr["c"]["light"][0],
    	"[wind]"=>$charr["c"]["wind"][0],
    	"[earth]"=>$charr["c"]["earth"][0],
    	"[wild]"=>$charr["c"]["wild"][0],
    	"[heal]"=>$charr["c"]["heal"][0],
    	"[focused]"=>$charr["c"]["focused"][0],
    
    	"[fish]"=>$charr["s"]["fish"][0],
    	"[cook]"=>$charr["s"]["cook"][0],
    	"[glyph]"=>$charr["s"]["glyph"][0],
    	"[mute]"=>$charr["s"]["mute"][0]
    );
    
    
    
    $image	= ImageCreateFromPNG("./cyphrex/cyphrex.png");
    
    
    //////////////////////////////// mqbar
    
    $forebg   = imagecolorallocatealpha($image, 1, 205, 49, 0);
    $backbg   = imagecolorallocatealpha($image, 255, 255, 255, 50);
    $borderbg = imagecolorallocatealpha($image, 0, 0, 0, 0);
    
    $kx = 36;
    $ky = 113;
    $kw = 113;
    $kh = 1;
    $expw = $kw*$charr["exp"]/70000000;
    if($expw > $kw) $expw = $kw;
    imagefilledrectangle($image, $kx, $ky, $kx+$expw, $ky+$kh, $forebg);
    
    
    //////////////////////////////// stuff
    
    	$text = strtr("[int]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 9, 0, 142, 62, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[dex]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 9, 0, 188, 29, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[str]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 9, 0, 142, 29, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[vit]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 9, 0, 188, 62, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[mqa]", $table);
    	$color = imagecolorallocatealpha($image, 150, 134, 82, 0);
    	ImageTTFText($image, 16, 0, 280, 70, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[class]", $table);
    	$color = imagecolorallocatealpha($image, 155, 0, 0, 0);
    	ImageTTFText($image, 9, 0, 53, 16, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[mqp]", $table);
    	$color = imagecolorallocatealpha($image, 150, 134, 82, 0);
    	ImageTTFText($image, 16, 0, 56, 70, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("Level: [level]", $table);
    	$color = imagecolorallocatealpha($image, 155, 0, 0, 0);
    	ImageTTFText($image, 9, 0, 62, 134, $color, "./Fonts/diablo.ttf", $text);
    
    	
    	$text = strtr("[dagger]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 6, 0, 217, 141, $color, "./Fonts/sans.ttf", $text);
    
    	
    	$text = strtr("[axe]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 6, 0, 252, 141, $color, "./Fonts/sans.ttf", $text);
    
    	
    	$text = strtr("[fire]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 6, 0, 287, 141, $color, "./Fonts/sans.ttf", $text);
    
    	
    	$text = strtr("[focused]", $table);
    	$color = imagecolorallocatealpha($image, 1, 205, 49, 0);
    	ImageTTFText($image, 6, 0, 322, 141, $color, "./Fonts/sans.ttf", $text);
    
    	
    
    imagepng($image);
    imagedestroy($image);
    ?>

Login zum Webhosting ohne Werbung!