Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2006
    Location
    Luton, England
    Posts
    481
    Tokens
    0

    Default Gd Libary / Php Help

    I'm coding a page using gd libary,

    http://www.fallypark.com/dynsig/inde...name=Teh_lastp
    and error
    Code:
    Fatal error:  Call to undefined function:  imagettftext() in /home/fallypar/public_html/dynsig/index.jpg on line 38

    this is the php for the page..

    PHP Code:
    <?php
    $handle 
    fopen("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=".$_GET['name'],"r"); 
    if(
    $handle){ 
       while (!
    feof($handle)) { 
       
    $contents .= fread($handle8192);} 
    fclose($handle);}
    function 
    GetLvl($skill)
    {    
    $str1 strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<');
        if(
    strpos($str1'd co')<30) return '--';
        
    $pos1 strpos($str1't"',strpos($str1't"')+1)+3;
            return 
    substr($str1$pos1strpos($str1,'<',$pos1)-$pos1);}        
    function 
    GetXP($skill)
    {    
    $str1 strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<');
        if(
    strpos($str1'd co')<30) return '--';
        
    $pos1 strpos($str1't"',strpos($str1't"',strpos($str1't"')+1)+1)+3
        return 
    substr($str1$pos1strpos($str1,'<',$pos1)-$pos1);}
    function 
    GetRank($skill)    
    {    
    $str1 strstr($GLOBALS['contents'], '>'.chr(10).$skill.chr(10).'<');
        if(
    strpos($str1'd co')<30) return '--';
        
    $pos1 strpos($str1't"')+3
        return 
    substr($str1$pos1strpos($str1,'<',$pos1)-$pos1);} 

    function 
    parse($skill){return GetLvl($skill);}

    if (
    GetRank(Overall) == '--') {
    echo 
    "RuneScape Name Not Found ";
    } else {
    $font="ARIAL.TTF";
    $imgfile "sig.png";
    $im_size getimagesize($imgfile);
    $image_width $im_size[0];
    $image_height $im_size[1];
    $im imagecreatetruecolor($image_width$image_height);
    $color imagecolorallocate($im255255255);
    $im2 imagecreatefrompng($imgfile);
    imagecopy($im$im20000$image_width$image_height);
    imagedestroy($im2);
    imagettftext($im12021515$color$font$_GET['name']);
    imagettftext($im12023090$color$font"Fallypark.com");
    imagettftext($im12021530$color$font"Overall: " parse(Overall));
    imagettftext($im12021545$color$font"Rank: " GetRank(Overall));
    imagettftext($im12021560$color$font"XP: " GetXP(Overall));
    imagettftext($im1202515$color$fontparse(Attack));
    imagettftext($im1202534$color$fontparse(Defence));
    imagettftext($im1202553$color$fontparse(Strength));
    imagettftext($im1202572$color$fontparse(Hitpoints));
    imagettftext($im1202591$color$fontparse(Ranged));
    imagettftext($im1206215$color$fontparse(Prayer));
    imagettftext($im1206234$color$fontparse(Magic));
    imagettftext($im1206253$color$fontparse(Cooking));
    imagettftext($im1206272$color$fontparse(Woodcutting));
    imagettftext($im1206291$color$fontparse(Fletching));
    imagettftext($im12010015$color$fontparse(Fishing));
    imagettftext($im12010034$color$fontparse(Firemaking));
    imagettftext($im12010053$color$fontparse(Crafting));
    imagettftext($im12010072$color$fontparse(Smithing));
    imagettftext($im12010091$color$fontparse(Mining));
    imagettftext($im12014015$color$fontparse(Herblore));
    imagettftext($im12014034$color$fontparse(Agility));
    imagettftext($im12014053$color$fontparse(Thieving));
    imagettftext($im12014072$color$fontparse(Runecraft));
    imagettftext($im12014091$color$fontparse(Slayer));
    imagettftext($im12018015$color$fontparse(Farming));
    imagettftext($im12018053$color$fontparse(Hunter));
    imagettftext($im12018034$color$fontparse(Construction));
    header("Content-type: image/png");
    imagepng($im);
    imagedestroy($im);
    }
    ?>
    And my servers gd dump..

    http://www.fallypark.com/dynsig/gd.php

    anyideas?
    Last edited by Matt-; 17-12-2006 at 11:57 AM.

Posting Permissions

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