Thread: [dodian][mysql] server sigs[/dodian]

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 [dodian][mysql] server sigs[/dodian] 
    Member
    Join Date
    May 2007
    Age
    31
    Posts
    209
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hello,
    This is kinda like zacks but i made it a few months ago and its for dodian servers .


    php code:
    [PHP]<?php
    $dbuser="USERNAME";
    $dbpass="PASSWORD";
    $dbname = "DATABASE NAME";
    $chandle = mysql_connect("localhost", $dbuser, $dbpass)
    or die("Connection Failure to Database");
    mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found." . $dbuser);
    $mysql = mysql_query("SELECT * FROM ibf_members WHERE name='$_GET[2]'") or die(mysql_error());
    while($row = mysql_fetch_assoc($mysql)){
    function getlvl($str11) {
    if($str11<'83'){
    $str11 = '1';
    }
    if($str11>='83' & $str11<'174'){
    $str11 = '2';
    }
    if($str11>='174' & $str11<'276'){
    $str11 = '3';
    }
    if($str11>='276' & $str11<'388'){
    $str11 = '4';
    }
    if($str11>='388' & $str11<'512'){
    $str11 = '5';
    }
    if($str11>='512' & $str11<'650'){
    $str11 = '6';
    }
    if($str11>='650' & $str11<'801'){
    $str11 = '7';
    }
    if($str11>='801' & $str11<'969'){
    $str11 = '8';
    }
    if($str11>='969' & $str11<'1154'){
    $str11 = '9';
    }
    if($str11>='1154' & $str11<'1358'){
    $str11 = '10';
    }
    if($str11>='1358' & $str11<'1584'){
    $str11 = '11';
    }
    if($str11>='1584' & $str11<'1833'){
    $str11 = '12';
    }
    if($str11>='1833' & $str11<'2107'){
    $str11 = '13';
    }
    if($str11>='2107' & $str11<'2411'){
    $str11 = '14';
    }
    if($str11>='2411' & $str11<'2746'){
    $str11 = '15';
    }
    if($str11>='2746' & $str11<'3115'){
    $str11 = '16';
    }
    if($str11>='3115' & $str11<'3523'){
    $str11 = '17';
    }
    if($str11>='3523' & $str11<'3973'){
    $str11 = '18';
    }
    if($str11>='3973' & $str11<'4470'){
    $str11 = '19';
    }
    if($str11>='4470' & $str11<'5018'){
    $str11 = '20';
    }
    if($str11>='5018' & $str11<'5624'){
    $str11 = '21';
    }
    if($str11>='5624' & $str11<'6291'){
    $str11 = '22';
    }
    if($str11>='6291' & $str11<'7028'){
    $str11 = '23';
    }
    if($str11>='7028' & $str11<'7842'){
    $str11 = '24';
    }
    if($str11>='7842' & $str11<'8740'){
    $str11 = '25';
    }
    if($str11>='8740' & $str11<'9730'){
    $str11 = '26';
    }
    if($str11>='9730' & $str11<'10824'){
    $str11 = '27';
    }
    if($str11>='10824' & $str11<'12031'){
    $str11 = '28';
    }
    if($str11>='12031' & $str11<'13363'){
    $str11 = '29';
    }
    if($str11>='13363' & $str11<'14833'){
    $str11 = '30';
    }
    if($str11>='14833' & $str11<'16456'){
    $str11 = '31';
    }
    if($str11>='16456' & $str11<'18247'){
    $str11 = '32';
    }
    if($str11>='18247' & $str11<'20224'){
    $str11 = '33';
    }
    if($str11>='20224' & $str11<'22406'){
    $str11 = '34';
    }
    if($str11>='22406' & $str11<'24815'){
    $str11 = '35';
    }
    if($str11>='24815' & $str11<'27473'){
    $str11 = '36';
    }
    if($str11>='27473' & $str11<'30408'){
    $str11 = '37';
    }
    if($str11>='30408' & $str11<'33648'){
    $str11 = '38';
    }
    if($str11>='33648' & $str11<'37224'){
    $str11 = '39';
    }
    if($str11>='37224' & $str11<'41171'){
    $str11 = '40';
    }
    if($str11>='41171' & $str11<'45529'){
    $str11 = '41';
    }
    if($str11>='45529' & $str11<'50339'){
    $str11 = '42';
    }
    if($str11>='50339' & $str11<'55649'){
    $str11 = '43';
    }
    if($str11>='55649' & $str11<'61512'){
    $str11 = '44';
    }
    if($str11>='61512' & $str11<'67983'){
    $str11 = '45';
    }
    if($str11>='67983' & $str11<'75127'){
    $str11 = '46';
    }
    if($str11>='75127' & $str11<'83014'){
    $str11 = '47';
    }
    if($str11>='83014' & $str11<'91721'){
    $str11 = '48';
    }
    if($str11>='91721' & $str11<'101333'){
    $str11 = '49';
    }
    if($str11>='101333' & $str11<'111945'){
    $str11 = '50';
    }
    if($str11>='111945' & $str11<'123660'){
    $str11 = '51';
    }
    if($str11>='123660' & $str11<'136594'){
    $str11 = '52';
    }
    if($str11>='136594' & $str11<'150872'){
    $str11 = '53';
    }
    if($str11>='150872' & $str11<'166636'){
    $str11 = '54';
    }
    if($str11>='166636' & $str11<'184040'){
    $str11 = '55';
    }
    if($str11>='184040' & $str11<'203254'){
    $str11 = '56';
    }
    if($str11>='203254' & $str11<'224466'){
    $str11 = '57';
    }
    if($str11>='224466' & $str11<'247886'){
    $str11 = '58';
    }
    if($str11>='247886' & $str11<'273742'){
    $str11 = '59';
    }
    if($str11>='273742' & $str11<'302288'){
    $str11 = '60';
    }
    if($str11>='302288' & $str11<'333804'){
    $str11 = '61';
    }
    if($str11>='333804' & $str11<'368599'){
    $str11 = '62';
    }
    if($str11>='368599' & $str11<'407015'){
    $str11 = '63';
    }
    if($str11>='407015' & $str11<'449428'){
    $str11 = '64';
    }
    if($str11>='449428' & $str11<'496254'){
    $str11 = '65';
    }
    if($str11>='496254' & $str11<'547953'){
    $str11 = '66';
    }
    if($str11>='547953' & $str11<'605032'){
    $str11 = '67';
    }
    if($str11>='605032' & $str11<'668051'){
    $str11 = '68';
    }
    if($str11>='668051' & $str11<'737627'){
    $str11 = '69';
    }
    if($str11>='737627' & $str11<'814445'){
    $str11 = '70';
    }
    if($str11>='814445' & $str11<'899257'){
    $str11 = '71';
    }
    if($str11>='899257' & $str11<'992895'){
    $str11 = '72';
    }
    if($str11>='992895' & $str11<'1096278'){
    $str11 = '73';
    }
    if($str11>='1096278' & $str11<'1210421'){
    $str11 = '74';
    }
    if($str11>='1210421' & $str11<'1336443'){
    $str11 = '75';
    }
    if($str11>='1336443' & $str11<'1475581'){
    $str11 = '76';
    }
    if($str11>='1475581' & $str11<'1629200'){
    $str11 = '77';
    }
    if($str11>='1629200' & $str11<'1798808'){
    $str11 = '78';
    }
    if($str11>='1798808' & $str11<'1986068'){
    $str11 = '79';
    }
    if($str11>='1986068' & $str11<'2192818'){
    $str11 = '80';
    }
    if($str11>='2192818' & $str11<'2421087'){
    $str11 = '81';
    }
    if($str11>='2421087' & $str11<'2673114'){
    $str11 = '82';
    }
    if($str11>='2673114' & $str11<'2951373'){
    $str11 = '83';
    }
    if($str11>='2951373' & $str11<'3258594'){
    $str11 = '84';
    }
    if($str11>='3258594' & $str11<'3597792'){
    $str11 = '85';
    }
    if($str11>='3597792' & $str11<'3972294'){
    $str11 = '86';
    }
    if($str11>='3972294' & $str11<'4385776'){
    $str11 = '87';
    }
    if($str11>='4385776' & $str11<'4842295'){
    $str11 = '88';
    }
    if($str11>='4842295' & $str11<'5346332'){
    $str11 = '89';
    }
    if($str11>='5346332' & $str11<'5902831'){
    $str11 = '90';
    }
    if($str11>='5902831' & $str11<'6517253'){
    $str11 = '91';
    }
    if($str11>='6517253' & $str11<'7195629'){
    $str11 = '92';
    }
    if($str11>='7195629' & $str11<'7944614'){
    $str11 = '93';
    }
    if($str11>='7944614' & $str11<'8771558'){
    $str11 = '94';
    }
    if($str11>='8771558' & $str11<'9684577'){
    $str11 = '95';
    }
    if($str11>='9684577' & $str11<'10692629'){
    $str11 = '96';
    }
    if($str11>='10692629' & $str11<'11805606'){
    $str11 = '97';
    }
    if($str11>='11805606' & $str11<'13034431'){
    $str11 = '98';
    }
    if($str11>='13034431'){
    $str11 = '99';
    }
    return $str11;
    }
    $image = imagecreatefrompng("http://www.wildyscape.biz/2/images/1.png");
    /* DO NOT REMOVE THIS!!!!! */
    //$List = "www.wildyscape.biz/2/1.txt";
    //$string = trim(file_get_contents($List));
    /* DO NOT REMOVE THIS!!!!! */
    //imagecolorallocate($image, R, G, B) in HEX values
    $font_black = imagecolorallocate($image, 2, 1, 8);
    $font_blue = imagecolorallocate($image, 255, 255, 255);
    //($image, fontsize, rightindent, downindent, data, txtcolour)
    $font = '3.ttf';
    $totalxp = $row[attack]+$row[defence]+$row[strength]+$row[hitpoints]+$row[range]+$row[prayer]+$row[magic]+$row[cooking]+$row[woodcutting]+$row[fletching]+$row[fishing]+$row[firemaking]+$row[crafting]+$row[smithing]+$row[mining]+$row[herblore]+$row[agility]+$row[thieving]+$row[slayer]+$row[farming]+$row[runecrafting];
    imagettftext($image, 13, 0, 286, 14, $font_blue, $font, "ServerName");
    imagestring($image, 1, 20, 120, "Made by: name here", $font_blue);
    imagestring($image, 2, 205, 80, $row['name'], $font_blue);
    imagestring($image, 2, 185, 95, "Total lvl: " . number_format($row['total']), $font_blue);
    imagestring($image, 2, 185, 110, "Total XP: " . number_format($totalxp), $font_blue);

    //SKILLS SKILLS SKILLS SKILLS SKILLS
    imagestring($image, 3, 32, 10, getlvl($row['attack']), $font_blue);
    imagestring($image, 3, 32, 34, getlvl($row['defence']), $font_blue);
    imagestring($image, 3, 32, 60, getlvl($row['strength']), $font_blue);
    imagestring($image, 3, 32, 85, getlvl($row['range']), $font_blue);
    //
    imagestring($image, 3, 78, 10, getlvl($row['prayer']), $font_blue);
    imagestring($image, 3, 78, 34, getlvl($row['hitpoints']), $font_blue);
    imagestring($image, 3, 78, 60, getlvl($row['magic']), $font_blue);
    imagestring($image, 3, 78, 85, getlvl($row['agility']), $font_blue);
    //
    imagestring($image, 3, 121, 10, getlvl($row['cooking']), $font_blue);
    imagestring($image, 3, 121, 34, getlvl($row['fishing']), $font_blue);
    imagestring($image, 3, 121, 60, getlvl($row['woodcutting']), $font_blue);
    imagestring($image, 3, 121, 85, getlvl($row['farming']), $font_blue);
    //
    imagestring($image, 3, 172, 10, getlvl($row['fletching']), $font_blue);
    imagestring($image, 3, 172, 34, getlvl($row['crafting']), $font_blue);
    imagestring($image, 3, 172, 60, getlvl($row['firemaking']), $font_blue);
    imagestring($image, 3, 172, 85, getlvl($row['slayer']), $font_blue);
    //
    imagestring($image, 3, 215, 10, getlvl($row['herblore']), $font_blue);
    imagestring($image, 3, 215, 34, getlvl($row['runecraft']), $font_blue);
    imagestring($image, 3, 215, 60, "X", $font_blue);
    //
    imagestring($image, 3, 256, 10, getlvl($row['thieving']), $font_blue);
    imagestring($image, 3, 256, 34, getlvl($row['mining']), $font_blue);
    imagestring($image, 3, 256, 60, getlvl($row['smithing']), $font_blue);
    }
    header("Content-type: image/png");
    imagecopy($image, $image, 0,0, 0, 0, 31, 29);
    imagecopy($image, $image, 0,0, 0, 0, 31, 29);
    imagepng($image);
    imagedestroy($image);
    ?>
    [/PHP]

    url example:
    Code:
    http://www.website.com/directory/sig.php?2=username&ext=.png
    the part that says &ext=.png is for other websites that dont allow dynamic images
    now download this file and put it in the same directory as your sig.php http://www.wildyscape.biz/2/fonts/3.ttf

    credits
    95% me
    5% zack for the whole &ext=.png thing
     

  2. #2  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    *pokes* forgot to include the fact that I gave you the ect=.png idea . Nice work btw.
     

  3. #3  
    Member
    Join Date
    May 2007
    Age
    31
    Posts
    209
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    yeah u did give me that idea haha and thanks
     

  4. #4  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    If you give me a few hours; I'll share the mod rewrite code with you.
     

  5. #5  
    Ben
    Guest
    Anyone gettin errors, put http:// infront of the urls.

    Can you help me?

    http://bashscape.info/sig.php?2=songoty&ext=.png
     

  6. #6  
    Registered Member
    Join Date
    Jun 2007
    Age
    31
    Posts
    427
    Thanks given
    17
    Thanks received
    38
    Rep Power
    67
    The image file is not found. Add me on msn if you want some more help.

    Switching computers. Give me a few minutes
     

  7. #7  
    Member
    Join Date
    May 2007
    Age
    31
    Posts
    209
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    there it should be fixed now
     

  8. #8  
    Ben
    Guest
     

  9. #9  
    Registered Member
    Z's Avatar
    Join Date
    Jun 2007
    Age
    29
    Posts
    1,390
    Thanks given
    7
    Thanks received
    30
    Rep Power
    853
    Guys, keep in mind this is taking from ibf_members; If you dont have your user integrated with an ipb, you have to edit that .
    Zack
     

  10. #10  
    Registered Member
    Join Date
    Feb 2007
    Age
    33
    Posts
    670
    Thanks given
    0
    Thanks received
    0
    Rep Power
    62
    only comment i have is this...

    if statements belong with an ELSE IF... using IF time after time after time will cause extra lag generating the image...
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •