• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[PHP] Character Signature - v4

Chris

Inactive
Senator
Joined
Aug 11, 2008
Messages
2,628
Solutions
2
Reaction score
240
What is it?
It is a PHP script which creates an illusion of an actual image, which may be used as forum signatures etc.

What does it do?

It allows you to see certain information about a specific player in a PHP GD image.

What information does it show?
It shows the name , free/premium account , online/offline status , level , profession , residence , guild (if any) , position (if any) and last login of a specific player.

How do I use it?
If you use unnamed-acc-maker by Gesior.pl, follow this small tutorial.
Open characters.php and find this row (approximately at line 155~):
PHP:
$main_content .= '</TD></TR></TABLE>';
Below that, add these lines:
PHP:
// Signature by makr0mango.
function randomSignature( $folder ) {
    $files = scandir ( "./$folder/" );
    $signature = array();
    
    foreach ( $files as $file ):
        if ( substr ( strtolower ( $file ) , -4 ) == ".png" )
            $signature[] = $file;
    endforeach;
    
    return rand(0,count($signature)-1);
}
$random = randomSignature("signatures");
$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Signature</B></TD></TR>';
$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='100' onclick='this.select();' value='[url=\"" . $_SERVER['HTTP_HOST'] . "\"][IMG]" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" . $name . "&image=" . $random . "[/IMG][/url]' /></TD></TR>";
$main_content .= "<TR BGCOLOR=".$config['site']['lightborder']."><TD WIDTH=20%>Direct Link:</TD><TD><input type='text' size='100' onclick='this.select();' value='" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" . $name . "&image=" . $random . "' /></TD></TR>";
$main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD COLSPAN='2' style='text-align: center;'><img src='signature.php?character=" . $name . "&image=" . $random . "' /></TD></TR>";
$main_content .= '</TD></TR></TABLE>';
// Signature by makr0mango.
If you however do not use unnamed-acc-maker by Gesior.pl you can easily access your images by adding /signatures.php?character=YOURCHARACTER&image=0 to the URL bar (when accessing the signatures.php file obviously).


Files included in download:

  • signatures.php
  • signatures/blue.png
  • signatures/green.png
  • signatures/red.png
  • signatures/arial.ttf
  • signatures/signatures.psd

Download Link:
http://uploadhyper.com/file/6853/signatures.rar.html

[The download link works]
 
Last edited by a moderator:
You could just add a link to it and have it separately in case it doesn't. ; )
 
Added position (if not normal player).
@Master-c: It seems you have already sent the headers, is that in a completely separate file?
@Victor: Whats wrong with having HTML inside a function?
 
Nice u made the position, but what do you mean?, i got error on this line
PHP:
    header ( "Content-type: image/png" );

I didn't understand you:p

I'm goign to be off, please explain before i'm getting offline:p
 
I have same errors as Master-C :/
I use Gesiors webpage too. Please help..
 
ehmm, why:S?

ok, new error
PHP:
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp2\htdocs\signature.php:1) in C:\xampp2\htdocs\signature.php on line 79

Warning: imagecreatefrompng() [function.imagecreatefrompng]: 'signature.png' is not a valid PNG file in C:\xampp2\htdocs\signature.php on line 86

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 100

Warning: imagestring(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 101

Warning: imagepng(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 104

Warning: imagedestroy(): supplied argument is not a valid Image resource in C:\xampp2\htdocs\signature.php on line 105

when will this be done?
 
Got the images to show on the main page when you try to create the image you get this massive error
Code:
‰PNG  ��� IHDR��B���z���E‘Í¿�� �IDATxœD¼i˜]iuú®µ¾½Ï95Ï“ªTƒJ*Í-©[=Ó4M7ؘ˜�ÆÁOä^;æì8¶sƒ8ÉÃ`s1¾Æ7ŽcÇø^®1iÛ4ÓÐ4MRRk,I%©TRÍÓ©áLUçìï[+?vu»~ÔSÏ~ö·÷Ùgk*÷}×»Š~çÿú:Œ € $d†W6egÁ�� "J13„H,Ä1C„sÄÁˆaQL™Aˆ! #RbȈÙE!h„D)3†‚LF†T!‘&$8qẤA ÖÀ̦ÊÂ"b‘HU Ê)Ž™˜ÙLé*,ÁÈh›@Ð,`f53*ž¦Ž‰  9"%À,IjDì$‚IP@Ä!„8ŽU•™£ÈDlªJD€Á’Ä"38(‘œc3U„Ä8çH bff木*@¦d!25À,2‚«l �šX"˜ˆXê„ÙÒçàRͶÒïDÕ¼…BÌbÞX™HÍÈ<¼YˆC†™�5¨Wcq ˆ`ˆwv�3‡؉™ZP “Ī‰…ƒPÕ"3S)\çB˜ziò¥oüÒ?¬Û›•bå•KÊÞÞ;8Ô?3u+ÓÑ1²wßV~£¨ŠÅææÆÚV©¥¡ee}íôøÙѡݏ>ôгßù~~i¹«¥¥XªŽ=ñ`‡ÈÌÕñB¡TßÔ]×XT‡öî»yébÖ¹©Ù¹¾Þ¾»}ðÒÓÏž¿·vÄäŽ:ØԐ[^Y]Úب&šklionýîSÓ¸k·‹:–W§zz:&._[Y\ÏÕ7üøû²*‘kµd=ŸßöÒÖÖnɶcíÈe_}á……¥Í§Ï_ž*X”kùïü{•¥[u™›—.^™?06ÚßÛ:99ùÀ#ï¬lñ•3§ë;»NÜs¨Átâü¥<÷Zïž±#÷Ýçܱ£cw.¾võæÜÊb1Ô*uu|ôäÉÁ½{‹…âëÏþàåWÎuvômnoŸxìÁ#‡Ç\®µ²¹fÅåµÂf¶mpóòåï|ó)úô—ž4X …eLGµ`BFd @ˆA”¾Î ‰À`Çì�Á‰‘0,"D,q¨23«BÄDÌÌœ&1Ô™Œc“ª%Ä$`2˜™Q€™8&"S˜ÉAŒ‰˜E˜�s’UUâÆ ±0 Òý"LD”ŒÄ …¢È¥™È{sNˆXMU}Pf1°©š��.xsoó*ÁÈLˆ�(Ype }@�"@ÞLƒŠ@êXT �er, °< (`ïkÌÇQµZ5@A R…Ì¼ª1¹ šÆ �jðY!§Œàõš¨’ˆWOóÊDééc…g&"2”EDC�Á[B@HTœ�Cʼƒ !cc6Öjæ½�‡Œƒ©SUpBÊDlj%Vƒ4—™Ó³ÏÝ{´³¥ñÔË/tíî¨Ïô´¶åW7£\óÙW_Ýã8¾týroo_ØÚ:<6ZØØôjË++-*-=ø–•µyfÍÔ5rKgjÕZkkÃVa©œÏªâ2qëî¾*B¡©¢u½]‰¯EÄäu;TYKÅÕBk[kÎle-õêDKG_WG¬ò*§¾½2óóSÅ*ü£>1=y}÷®Álc¶\*/¬®¶õtZµ¼^Ô}{F;Z¢J¥pâÀþÓÏ|ûÂËÓsöÊ>õùÞææCíÅɉ³½û_Ü|áïûG:»zósSMuõë•õb¡V©9yßúÂÊvRŠ”öìÍתQÀÊâÒäÜÌÝ=428°09UÝÜ~ýÊÕr©²oìP~iÑÕ¹\}s®R»|ñÜâfþÎüSý½÷¼4~¶£©M+ÉÄõë "c°š:G¶ó’ÒÚeb¨`baƒˆÌ`&âˆ@é…ˆ3e‚°´jHˆˆÍ(Ýè¦!TCˆ…’à!DöFÑg‚™š†`f*"f0³ÀÌÔHjI5Š""¦à¡ôŽ"ÌÌI’011Q �˜©*‰™2T‰ÉûÀ,éSÿSÁÑ â( �uBd0a3%ÔÆÄ.€€À�3§µ‡eçnÌ 0©D0f"RUN“ÈÄ9 ª¦#’ô¥¸ˆ4„ZbD€™Ö4¨YÔÌ1+ÒBn�²qdµ¬Fð^$ŠˆŒˆEBRÕôaÅ˜ffJ v`fò9€à˜1@LD0‡ j 3‘ÂÔˆÈÔ A�`&ì4À˜ÔÉùË—v×gOz!Eóô*éóû~ò]çΝÝóð£÷ïîêÙ̯»ÌþlS[ïàHWk“¾¶ºa„ÆÑáÂƶËeÜviyz¦¼˜¿s}ª¥±°c»·Wk_Ÿ™±\ÓÜâü»~æ}·ôü+7¯íÝŸlkg[Û`gÝ…3[‡w·64Ç.ºç±wÜšYØ4,LN^¼1Ñ60Úß×ÑX?ȁ¼ÿ¾©·V7VT½cKª›Ø*ïêè±°½÷ð=.–Í;+o}ü½»w]žX]Ú³oquùž>ÕV[?õì÷ö´5_=ÿúÅl¶£¹Í¹êí™…w¼õ*WÏŸ1ÕÂFùôåKÛšüXÄÅ™ùÉÕ…r)YÙ,--*tµunÙÖϼÿ½ßÿÆ7N_»ÐÜw°°™Ü¹xæÌõk=òð}{ö*¯¬¶k"ÜÞÒðݧŸÚ³̘VW6KegæƒE#À”Ä€@D¤/„æ"±‚ ˜‚Ws1¦;aŸ¥™†vÎ…D†¤¦`IѤBY™J0‚i�ˆ9JCÓ%2&¨*35€fÙiPf'$j�B€ˆ0€™iÐ4w°03¥°ÏŒÂñ4Ö‰T‘&ïƒÁ˜Ù‡„E›ÅQ”hfSS2EPe‚Ì9gf>☙cUó¾J{3"†Ú÷ $BdÂfSÇŽHUUŒœ#a3£|Ê"%5/LB”¨2AHˆYÕ¿™x5°90”-¸8Râ¤æa€*i0‘’Á@Jl g¶×L¤ªNÄ/fFP&ƒED28P#3c…±)1²Ä3á�#µˆQ03€T j0›˜„àëš2ŒÐ˜m<Þ;3}»±¹uc}µ¥¥cm½<<8<³°‚(‹¸¥ZJšÛû—7ËñúÖw¿÷loWó\Ÿ=õRq£ÓŸþÉwgjZYÛìoiY(®×õö¶÷î^+WÈ\ow{²]é;:6Úß=7y³·R”õ¹õr©§û@ÇÀzñùÚÂìtq25?x²pãêüìB±Tìéh¯«¯ïmÌl$Éù×ÊÚSÜ*–Ê¥HèÐáC - »zzæf«5äW6¦nßÈIvèÁ·ŒÚÖƒ£]ŸùÈ?[ÝN~êýÞ÷À ¯ZsuÓ3›U»¼eW§æ;Û‡vuENÿü¿ý·òºæ'oüØϽ?n¨Ë´6®_=?19ÇQ]~~ªØÙu׽dzI™“í®íøõ¾2Û=1´«½«©¡·³¹½§ýê$-Þ™)nÆGê÷ïU`l ¿®šL_¹BŸþÒßÌÔ±©¥%‘Aaž! Vc0 ¦炐@##Q°ˆ°ca&Ž‰Á,€1DÄqZÍÀ$".*–nk–ÈTƒ‡@8å½dªfÁŒÇÁLX‚&αjvŽEˆ‰@LÌi%qÎ9"�(13À)ad"bƒšîO“Á«8cUˆ`fb"�&Nj!‰Y„8˜‘1^1G"€‚Á‰�ÄÂL”ÔŒ)bÚv0Ióƒ@Ì Fj"ÇgŠƒ*Ì‚¬ª s3"6SU˜‚HBPCP5§jBa§Ôâ *ð¢Z3€$ñj�Cƒ©×@,P2(  #Ä)ü0U‹¢(MCÁ,˜y"ÅDqM-ƒÕT"§0ƒú¼ZPTƒ&AɈ‚"†I‚„ˆÒwí«I}CýÒÔøê«ׄr[[CRKöîÛoÕ‚šÛ*W3Šùåu¯¥rO[ëÝG^ºru~a6ÉÀððÿøÛï\»±:·–/¯ÜýÖ·õïÙ³¾0Ç™ÆâêҝÛwúžÈ6¶æoŽ×µu´7çt«°éê3…„]CK!ÀooKÁsWS®ʳ3sezç'oY-¿ýÊ¥Ë[QS´]^ž›¿uç‘·ÜÓÛÑÉ™5¿{pϝ¹ù•âj…Øe®LÌZO¼õžÞ¦]Å¥éK§^ùóo=sm#|ð_þÂ?Ë‘Rq=“ËñÆÒÒôí[Ó‹“‹ïúÀ{öîÚµps¢u÷žæÖÁ׿õ£ö_¼z}`x¤µ9=r
 
Sorry.. but aperantly the above code also debug's you browser when posting it in forums... because it froze my browser.. and then gave me a big jumble mess of bug's and restarted my computer..

using firefox.. LOL
 
Love the idea.. ill try and fiddle with it to make it work.. but i wouldn't expect myself to be able to actualy make it work correctly...
 
Nice u made the position, but what do you mean?, i got error on this line
PHP:
    header ( "Content-type: image/png" );

I didn't understand you:p

I'm goign to be off, please explain before i'm getting offline:p

try to use something like:

<? include 'signature.php'; ?>
 
Back
Top