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!


Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 47
  1. #11
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Error.



    Selling DJ/Habbo layout, more info here.


  2. #12
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Thanks again.

    I'll try and clean up the code tomorrow and make the functions smaller and tidier.

    One thing I did was, make the searching of strings in the functions more stronger. In Tom's script he just searched for text which people could post on peoples Guestbooks, etc which would make their image come up as "Banned" or "private" etc.

    @Above: I don't think you have Freetype support enabled which I THINK you need.
    Last edited by Invent; 04-10-2007 at 12:19 AM.

  3. #13
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Talked to you on MSN.


    Selling DJ/Habbo layout, more info here.


  4. #14
    Join Date
    Oct 2006
    Posts
    2,918
    Tokens
    946
    Habbo
    Verrou

    Latest Awards:

    Default

    Is there a way to enable Freetype support? I've tried on 2 hosts, both don't work :S

    habbo.php works, but .htaccess doesn't...
    Last edited by Verrou; 04-10-2007 at 08:08 AM.
    Quote Originally Posted by Special-1k View Post
    How do you uninstall an internet? I want to uninstall my Google Chrome and
    get firefox but I never really got rid of an internet my dad usually did it for me.
    If you know how post below so I can do this.

  5. #15
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    Do a phpinfo and post the link to it.

  6. #16
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    This is a pain, we have a .htaccess file but just not showing up in cpanel

    Edit: dm, didnt click show hidden files :p
    Last edited by Moh; 04-10-2007 at 01:27 PM.

  7. #17
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    It might not be a freetype support error and just a general error in the script. I'll take a look at the code today to see if I can spot any errors.

  8. #18
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Simon can u unblock me pls

    http://airhabbo.com/sig/uk/.:Jack120:.
    Dosnt work


    Also, the reason your htaccess may not be working is because you will have 2 change the URL :p

  9. #19
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    Jack's doesnt work :{
    I'd like to try this

  10. #20
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I think I might know the error, I'll try and fix it today.

    EDIT: Please try this as the "habboClass.php" file:

    PHP Code:
    <?php
    /*##########################################################*\
    ||                                                            ||
    ||    This script was completely coded by Invent! on Habbo    ||
    ||    UK (AKA, Simon Fletcher), please feel free to re-dis    ||
    ||    -tribute the code, but please keep this message in-        ||
    ||    tact! Thanks for using the script! xx                    ||
    ||                                                            ||
    \*##########################################################*/

    /* Please don't edit ANY of this code if you don't know PHP! */

    class imager
    {

        var 
    $habbo;
        var 
    $hotel;
        var 
    $image;
        var 
    $site;
        
        function 
    startImager()
        {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            if(
    preg_match('/\<div class=\"v3box-top\"\>\<h3\>Sorry!\<\/h3\>/i'$page))
            {
            
                
    $crop imagecreatefrompng("banned.png");
            
                
    header("Content-Type: image/png");
                @
    imagepng($crop);
                @
    imagedestroy($crop);

                
            }
            elseif(
    preg_match('/\<div class="v3box-top"\>\<h3>Habbo Home Could Not Be Viewed\<\/h3><\/div>/i'$page))
            {
            
                
    $crop imagecreatefrompng("private.png");
                
                
    header("Content-Type: image/png");
                @
    imagepng($crop);
                @
    imagedestroy($crop);

                
            }
            elseif(
    eregi('<div id="page-headline-text">Habbo Homes</div>'$page))
            {
            
                
    $crop imagecreatefrompng("exist.png");
                
                
    header("Content-Type: image/png");
                @
    imagepng($crop);
                @
    imagedestroy($crop);
                
            }
            else
            {
            
                
    $this -> doImager();
                
            }
            
        }
        
        function 
    get_badge() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $badge explode'http://images.habbohotel.'.$this->hotel.'/c_images/album1584/'$page );
            
    $badge1 explode'.gif'$badge[1] );
            
            
    $badge "http://images.habbohotel.".$this->hotel."/c_images/album1584/".$badge1[0].".gif";
            
            return 
    $badge;
                        
        }
        
        function 
    get_group_badge() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $badge explode'<img src="/habbo-imaging/badge/'$page );
            
    $badge1 explode'.gif'$badge[1] );
            
            
    $badge "http://www.habbo.".$this->hotel."/habbo-imaging/badge/".$badge1[0].".gif";
            
            return 
    $badge;
            
        }
        
        function 
    get_habbo() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $habbo "http://www.habbo.".$this->hotel."/habbo-imaging/avatarimage?user=".$this->habbo."&action=&direction=2&head_direction=2&gesture=sml&size=l&img_format=gif";
            
            return 
    $habbo;
            
        }    
        
        function 
    get_motto() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $motto explode'<div class="profile-motto">'$page );
            
    $motto1 explode'<div class="clear">'$motto[1] );
            
            
    $motto $motto1[0];
            
            
    $motto str_replace'        '''$motto );
        
            
    $motto str_replace'
        '
    ''$motto);
            
            
    $motto preg_replace('/<img src="http:\/\/images.habbohotel.co.uk\/habboweb\/16\/11\/web-gallery\/images\/fonts\/volter\/[0-9][0-9][0-9].gif" class="vchar" \/>/'''$motto);
            
            return 
    $motto;
            
        }
        
        function 
    get_name() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $motto explode'<span class="name-text">'$page );
            
    $motto1 explode'</span>'$motto[1] );
            
            
    $motto $motto1[0];
            
            return 
    $motto;
            
        }
        
        function 
    get_status() {
        
            
    $site "http://www.habbo.co.uk/home/".$this->habbo;
            
    $page file_get_contents$site );        
        
            
    $motto explode'" src="http://images.habbohotel.'.$this->hotel.'/web/web-5.0.17/images/myhabbo/profile/habbo_'$page );
            
    $motto1 explode'.gif" />'$motto[1] );
            
            
    $motto $motto1[0];
            
            return 
    $motto;
            
        }
        
        function 
    imagettftextoutline (& $im ,$size ,$angle ,$x ,$y ,& $col ,& $outlinecol ,$fontfile ,$text ,$width )
        {
        
            
    // For every X pixel to the left and the right
            
    for ( $xc =$x -abs ($width ); $xc <= $x +abs ($width ); $xc ++)
            {
                
    // For every Y pixel to the top and the bottom
                
    for ( $yc =$y -abs ($width ); $yc <= $y +abs ($width ); $yc ++)
                {
                    
    // Draw the text in the outline color
                    
                    
    $text1 imagettftext ($im ,$size ,$angle ,$xc ,$yc $outlinecol ,$fontfile ,$text );
                }
            }
            
    // Draw the main text
            
    $text2 imagettftext ($im ,$size ,$angle ,$x ,$y ,$col ,$fontfile ,$text );
        }
        
        
    ###################
        /* This is the PHP GD Part where we compile the image */
        ###################
        
        
    function doImager()
        {
        
            
    $crop = @imagecreatefrompng($this->image);
            
            
    $url $this->get_habbo();
            
    $image = @imagecreatefromgif($url);
            @
    imagecopy $crop$image25140060120 );
            
            
    $colourBlack imagecolorallocate($crop535547);
            
    $colourWhite imagecolorallocate($crop255255255);
            
            
    $font 'Volter-Bold (Goldfish).ttf';
            
    $font2 'Volter.ttf';
            
    $text "Name:";
            
    $text2 html_entity_decode$this->get_name() );
            
            
    $a1 imagettftext($crop"6.5"012032$colourBlack$font$text);
            
    $a2 imagettftext($crop"6.5"0133 strlen($text) * imagefontwidth($font), 32.5$colourBlack$font2$text2);
            
            
    $font 'Volter-Bold (Goldfish).ttf';
            
    $font2 'Volter.ttf';
            
    $text "Motto:";
            
    $text2 html_entity_decode$this->get_motto() );
            
            
    $b1 imagettftext($crop"6.5"012062$colourBlack$font$text);
            
    $b2 imagettftext($crop"6.5"0133 strlen($text) * imagefontwidth($font), 52.5$colourBlack$font2$text2);

            
    $group $this->get_group_badge();
            
            if(!empty(
    $group)) {
            
            
    $image3 = @imagecreatefromgif($group);
            
    $x"0";
            
    $y"0";
            
    imagecopy $crop$image312390$x$yimagesx($image3), imagesy($image3) );
            }
            
            
    $badge $this->get_badge();
            
            if(
    $badge != "" && $badge != "http://images.habbohotel.".$this->hotel."/c_images/album1584/.gif") {
            
            
    $image4 = @imagecreatefromgif($badge);
            
    $x"0";
            
    $y"0";
            
    imagecopy $crop$image419690$x$yimagesx($image4), imagesy($image4) );
            }
            
            
    $status $this->get_status();
            
            if(
    $status == "online_anim")
            {
                
    $status "online";
            }
            
            if(
    $status == "online") {
                
    $image5 = @imagecreatefromgif("online.gif");
            }
            else
            {
                
    $image5 = @imagecreatefromgif("offline.gif");
            }
            
    $x"0";
            
    $y"0";
            
    imagecopy $crop$image5257100$x$yimagesx($image5), imagesy($image5) );
            
    $a3 imagettftext($crop"6.5"0265133$colourBlack$fontucfirst($status));
            
            
    $kdawg imagecolorallocate($crop24949);
                
                
    $arr = @imagettfbbox(6.40$font$this->site);
                
    $width $arr[2] - $arr[0];
                
    $x = @imagesx($crop) - $width $diff-14;
                
                
    $site_text $this->imagettftextoutline($crop"6.5"0$x148$colourWhite$kdawg$font$this->site1);
                
                
    /* end of status */
                
                
    header("Content-Type: image/png");
                @
    imagepng($crop);
                @
    imagedestroy($crop);

        }
        
    }
    ?>
    I also just realised the habboClass.php file in the ZIP doesn't have a closing PHP Tag! If the above code works then I'll re-zip the files and upload them again.
    Last edited by Invent; 04-10-2007 at 03:44 PM.

Page 2 of 5 FirstFirst 12345 LastLast

Posting Permissions

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