Gå til innhold

Det er for store mellomrom i php bildet


Anbefalte innlegg

Se her. Det er altfor store mellomrom, hvordan får jeg det bort?

 

Her er minsig.jpg:

<?php
header ("Content-type: image/jpg");

$s=$_SERVER;
$h="HTTP_USER_AGENT";
//check browser and os, no need to change this unless you know what your doing
if (stristr($s[$h],"offbyone")) {$brow= "Off By One";}
elseif (stristr($s[$h],"3b_web")) {$brow= "3B Browser";}
elseif (stristr($s[$h],"getrig")) {$brow= "Getright Browser";}
elseif (stristr($s[$h],"webtv")) {$brow= "Web TV";}
elseif (stristr($s[$h],"aol")) {$brow= "AOL";}
elseif (stristr($s[$h],"opera")) {$brow= "Opera";}
elseif (stristr($s[$h],"netposit")) {$brow= "NetPositive";}
elseif (stristr($s[$h],"ibrowse")) {$brow= "IBrowse";}
elseif (stristr($s[$h],"abrowse")) {$brow= "ABrowse";}
elseif (stristr($s[$h],"firefox")) {$brow= "Firefox";}
elseif ((stristr($s[$h],"firebird")) or (stristr($s[$h],"phoenix"))) {$brow= "Firebird";}
elseif (stristr($s[$h],"omniweb")) {$brow= "OmniWeb";}
elseif (stristr($s[$h],"safari")) {$brow= "Safari";}
elseif ((stristr($s[$h],"camino")) or (stristr($s[$h],"chimera"))) {$brow= "Camino";}
elseif (stristr($s[$h],"konqueror")) {$brow= "Konqueror";}
elseif (stristr($s[$h],"icab")) {$brow= "iCab";}
elseif (stristr($s[$h],"dillo")) {$brow= "Dillo";}
elseif (stristr($s[$h],"epiphany")) {$brow= "Epiphany";}
elseif (stristr($s[$h],"oregano")) {$brow= "Oregano";}
elseif (stristr($s[$h],"k-meleon")) {$brow= "K-Meleon";}
elseif (stristr($s[$h],"webcapture")) {$brow= "Adobe WebCapture";}
elseif (stristr($s[$h],"galeon")) {$brow= "Galeon";}
elseif (stristr($s[$h],"lynx")) {$brow= "Lynx";}
elseif (stristr($s[$h],"netscape")) {$brow= "Netscape";}
elseif (stristr($s[$h],"entergy")) {$brow= "EntergyNET";}
elseif (stristr($s[$h],"msie")) {$brow = "Internet Explorer";}
elseif (stristr($s[$h],"mozilla")) {$brow= "Mozilla Compliant";}
else {$brow="";}
if ((stristr($s[$h],"linspire")) or (stristr($s[$h],"lindows"))) {$os= "Linspire";}
elseif (stristr($s[$h],"beos")) {$os= "BeOS";}
elseif (stristr($s[$h],"skyos")) {$os= "SkyOS";}
elseif (stristr($s[$h],"atheos")) {$os= "AtheOS";}
elseif (stristr($s[$h],"palmos")) {$brow= "PalmOS";}
elseif (stristr($s[$h],"nokia")) {$brow= "Nokia";}
elseif (stristr($s[$h],"blackberry")) {$brow= "Blackberry";}
elseif (stristr($s[$h],"zeta")) {$os= "Zeta";}
elseif (stristr($s[$h],"irix")) {$os= "IRIX";}
elseif (stristr($s[$h],"risc")) {$os= "RISC OS";}
elseif (stristr($s[$h],"os/2")) {$os= "OS/2";}
elseif (stristr($s[$h],"amigaos")) {$os= "Amiga";}
elseif (stristr($s[$h],"freebsd")) {$os= "FreeBSD";}
elseif (stristr($s[$h],"netbsd")) {$os= "NetBSD";}
elseif ((stristr($s[$h],"sunos")) or (stristr($s[$h],"solaris"))) {$os= "Solaris";}
elseif ((stristr($s[$h],"os x")) or (stristr($s[$h],"osx")) or (stristr($s[$h],"darwin"))) {$os= "Mac OS X";}
elseif ((stristr($s[$h],"macintosh")) or (stristr($s[$h],"mac_"))) {$os= "Macintosh";}
elseif (stristr($s[$h],"qnx")) {$os= "QNX";}
elseif (stristr($s[$h],"linux")) {$os= "Linux";}
elseif (stristr($s[$h],"unix")) {$os= "Unix";}
elseif (stristr($s[$h],"x11")) {$os= "X11";}
elseif ((stristr($s[$h],"windows")) or (stristr($s[$h],"win95")) or (stristr($s[$h],"winnt")) or (stristr($s[$h],"win98"))) {$os= "Microsoft Windows";}
else {$os="";}

if ($brow=="" and $os=="") {exit();}
//replace this with any background
$img_handle = imagecreatefrompng("sig.png");

//this is to use custom fonts as many hosts don't support imagettftext, you can get .gdf fonts by downloading the gdfont generator at http://www.philiplb.de/index.php?showdownload=63&p=Downloads

$font = imageloadfont("Verdana.gdf");

//change coordinates of text, eg 1st imagestring is 5, 20 this 5pixels across on the X axis and 20pixels down on the Y axis
//also change the text you want displayed here
ImageString ($img_handle, $font, 20, 50,  "IP:".$_SERVER['REMOTE_ADDR'], $txt_color);


ImagePng ($img_handle);
imagedestroy($img_handle);
?> 

Lenke til kommentar
Videoannonse
Annonse

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...