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 8 of 8
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default The image cannot be displayed, because it contains errors.

    Well im trying to make this script select the habbo name from a users database, and then display it from just entering the username.

    I have tried it without the database and it works.
    PHP Code:
    <?php
    header
    ("Content-type: image/gif");
    include(
    "config.php");
    $getuser mysql_query("SELECT * from users where username = '$_GET[user]' AND banned = '0'"); 
    $usernum mysql_num_rows($getuser); 
    $profile mysql_fetch_array($getuser);
    $habbo '$profile[habboname]';
    $domain 'http://www.habbo.$profile[hotel]';
    $content file_get_contents($domain '/home/'.$habbo);
    $div_start explode('<div class="profile-figure">'$content2);
    $div_end explode('</div>'$div_start[1], 2);
    $img trim($div_end[0]);
    $img preg_replace('/<img alt=\"(.*?)\" src=\"(.*?)\" \/>/''$2'$img);
    $imag $domain.$img;
    $im imagecreatefromgif($imag);
    imagegif($im);
    imagedestroy($im);
    ?>
    Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.
    Last edited by Agesilaus; 02-01-2008 at 11:22 PM.

  2. #2
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    um..

    I wouldnt do it like that, theres a much easier way

    Try..

    PHP Code:
    <?php
    header
    ("content-type: image/gif");
    require(
    "config.php");
    $get_info mysql_fetch_array(mysql_query("SELECT * from users where username = '$_GET[user]' AND banned = '0'"));
    $im_url "http://www.habbo.";
    $im_url .= $get_info[hotel];
    $im_url .= "/habbo-imaging/";
    $im_url .= "user=".$get_info[habbo]."&direction=4&gesture=sml&img_format=gif";
    echo(
    $im_url);
    ?>
    Last edited by MrCraig; 02-01-2008 at 07:32 PM.
    Coming and going...
    Highers are getting the better of me

  3. #3
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Just wondering, these scripts were they fetch a user's image and infomation etc, would there be a way to fetch a user's password?

    Im not a hacker just curious lol.

  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    normally, the passwords are encrypt

  5. #5
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Frequancy View Post
    Just wondering, these scripts were they fetch a user's image and infomation etc, would there be a way to fetch a user's password?

    Im not a hacker just curious lol.
    Of course there is.. That wouldnt be a security risk to sulake at all....:rolleyes:

    -SARCASM-
    Coming and going...
    Highers are getting the better of me

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

    Latest Awards:


  7. #7
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Sorry, my mistake

    Try
    PHP Code:
    <?php
    header
    ("Content-type: image/gif");
    require(
    "config.php");
    $get_info mysql_fetch_array(mysql_query("SELECT * from users where username = '$_GET[user]' AND banned = '0'"));
    $im_url "http://www.habbo.";
    $im_url .= $get_info[hotel];
    $im_url .= "/habbo-imaging/avatarimage?";
    $im_url .= "user=".$get_info[habbo]."&direction=4&gesture=sml&img_format=gif";
    $image imagecreatefromgif($im_url);
    imagegif($image);
    imagedestroy($image);
    ?>
    Last edited by MrCraig; 02-01-2008 at 08:01 PM.
    Coming and going...
    Highers are getting the better of me

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

    Latest Awards:

    Default

    Same error.
    I know GD works as this works:
    http://habbcrazy.net/getuserimg/habb...me=.:Jack120:.

    Edit: Tried above one, and works now

    Thanks. +Rep
    Last edited by Moh; 02-01-2008 at 08:06 PM.

Posting Permissions

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