Avatarimage.php script

Page 2 of 2 FirstFirst 12
Results 26 to 36 of 36
  1. #26
    Account Upgraded | Title Enabled! Akimbo is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    305Posts

    Re: Avatarimage.php script

    Quote Originally Posted by joopie View Post
    :stupid:

    PHP Code:
    while($row mysql_fetch_assoc($result)) 
    To

    PHP Code:
    $row mysql_fetch_assoc($result
    /facepalm
    I acctly tried that one, didn't work for me >.<
    Edit: Parse error: syntax error, unexpected T_ECHO in avatarimage.php on line 20

  2. #27
    Apprentice MrCR is offline
    MemberRank
    Oct 2011 Join Date
    9Posts

    Re: Avatarimage.php script

    Good job guy, but this script does not support the use HTML tags <img>, try the php document be interpreted as an image like mine: http://www.maniahotel.com.br/avatar?...ure=sml&size=b

  3. #28
    Apprentice MrCR is offline
    MemberRank
    Oct 2011 Join Date
    9Posts

    Re: Avatarimage.php script

    Good job guy, but this script does not support the use HTML tags <img>, try the php document be interpreted as an image like mine:
    http://www.maniahotel.com.br/avatar?...ure=sml&size=b

  4. #29
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Avatarimage.php script

    Quote Originally Posted by Akimbo View Post
    I acctly tried that one, didn't work for me >.<
    Edit: Parse error: syntax error, unexpected T_ECHO in avatarimage.php on line 20
    did you ever put an ; after the "$row = ...."???

  5. #30
    Account Upgraded | Title Enabled! Akimbo is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    305Posts

    Re: Avatarimage.php script

    If it matter, yes, i did.

    Quote Originally Posted by MrCR View Post
    Good job guy, but this script does not support the use HTML tags <img>, try the php document be interpreted as an image like mine: http://www.maniahotel.com.br/avatar?...ure=sml&size=b
    Something like this?:
    PHP Code:
    <?php
    header
    ("Content-Type: image/png");
    ?>
    <?php
    $dbhost 
    'localhost'
    $dbuser 'root'
    $dbpass ''
    $db 'uber'

    mysql_connect($dbhost,$dbuser,$dbpass);   
    mysql_select_db($db);   
    $action mysql_real_escape_stringstrip_tags$_GET["action"] ) ); 
    $direction mysql_real_escape_stringstrip_tags$_GET["direction"] ) ); 
    $head_direction mysql_real_escape_stringstrip_tags$_GET["head_direction"] ) ); 
    $gesture mysql_real_escape_stringstrip_tags$_GET["gesture"] ) ); 
    $size mysql_real_escape_stringstrip_tags$_GET["size"] ) ); 
    $u mysql_real_escape_stringstrip_tags$_GET["user"] ) ); 
    $userq mysql_query("SELECT * FROM users WHERE username = '$u' LIMIT 1");
    $user mysql_fetch_array($userq);
    $looks $user['look'];
    $image imagecreatefrompng("stand.png");
    $look imagecreatefrompng("http://habbo.com/habbo-imaging/avatarimage?figure='.$looks.'&action=" $action "&direction=" $direction "&head_direction=" $h_direction "&gesture=" $gesture "&size=" $size "");
    imagecopy($image$look9106134994);


    ImagePng ($look);
    imagedestroy($look);        


    // $result = mysql_query($query) or die('Query failed: ' . mysql_error()); //Okay
    // if(mysql_num_rows($result)) { //thihi<3
    // while($row = mysql_fetch_assoc($result)) { //resultat...
    // echo "<img src=\"http://habbo.com/habbo-imaging/avatarimage?figure=".$row['look']."\" alt='".$row['username']."'>";
    //        }
    // }
    ?>
    Last edited by Akimbo; 16-12-12 at 05:10 PM.

  6. #31
    Valued Member iOmvuZ is offline
    MemberRank
    May 2012 Join Date
    104Posts

    Re: Avatarimage.php script

    It would be nicer if you use'd the look code instead of the username.
    something like: this

  7. #32
    Account Upgraded | Title Enabled! Akimbo is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    305Posts

    Re: Avatarimage.php script

    Quote Originally Posted by iOmvuZ View Post
    It would be nicer if you use'd the look code instead of the username.
    something like: this
    The point is like using for fansites and habbo-generator's. Habbo retro fansites can use that for usersystem's and other stuff :) It's really usable for other stuff to.
    Example:
    If the user change their look, it will be updating auto!

  8. #33
    Valued Member iOmvuZ is offline
    MemberRank
    May 2012 Join Date
    104Posts

    Re: Avatarimage.php script

    Quote Originally Posted by Akimbo View Post
    The point is like using for fansites and habbo-generator's. Habbo retro fansites can use that for usersystem's and other stuff :) It's really usable for other stuff to.
    Example:
    If the user change their look, it will be updating auto!
    Never thought about that! OT: Thanks for the release.

  9. #34
    Apprentice MrCR is offline
    MemberRank
    Oct 2011 Join Date
    9Posts

    Re: Avatarimage.php script

    Quote Originally Posted by Akimbo View Post
    If it matter, yes, i did.



    Something like this?:
    PHP Code:
    <?php
    header
    ("Content-Type: image/png");
    ?>
    <?php
    $dbhost 
    'localhost'
    $dbuser 'root'
    $dbpass ''
    $db 'uber'

    mysql_connect($dbhost,$dbuser,$dbpass);   
    mysql_select_db($db);   
    $action mysql_real_escape_stringstrip_tags$_GET["action"] ) ); 
    $direction mysql_real_escape_stringstrip_tags$_GET["direction"] ) ); 
    $head_direction mysql_real_escape_stringstrip_tags$_GET["head_direction"] ) ); 
    $gesture mysql_real_escape_stringstrip_tags$_GET["gesture"] ) ); 
    $size mysql_real_escape_stringstrip_tags$_GET["size"] ) ); 
    $u mysql_real_escape_stringstrip_tags$_GET["user"] ) ); 
    $userq mysql_query("SELECT * FROM users WHERE username = '$u' LIMIT 1");
    $user mysql_fetch_array($userq);
    $looks $user['look'];
    $image imagecreatefrompng("stand.png");
    $look imagecreatefrompng("http://habbo.com/habbo-imaging/avatarimage?figure='.$looks.'&action=" $action "&direction=" $direction "&head_direction=" $h_direction "&gesture=" $gesture "&size=" $size "");
    imagecopy($image$look9106134994);


    ImagePng ($look);
    imagedestroy($look);        


    // $result = mysql_query($query) or die('Query failed: ' . mysql_error()); //Okay
    // if(mysql_num_rows($result)) { //thihi<3
    // while($row = mysql_fetch_assoc($result)) { //resultat...
    // echo "<img src=\"http://habbo.com/habbo-imaging/avatarimage?figure=".$row['look']."\" alt='".$row['username']."'>";
    //        }
    // }
    ?>
    Exactly, just make sure that the image is not when used with white background in HTML.

    Man, good job, I think you and I were the only ones thinking about avatarimage for fansite use!

  10. #35
    Owner of Habbo.ac iRaged is offline
    MemberRank
    Nov 2011 Join Date
    229Posts

    Re: Avatarimage.php script

    Here's mine. Works with username or if you just want a look!
    Code:
    <?php 
    
    	if(isset($_GET['user'])) {
    
    	 	$host = "host";
    	 	$username = "root";
    	 	$password = "pass";
    	 	$dbname = "db";
    	 	$connect = mysql_connect($host, $username, $password) or die(mysql_error());
    	 	mysql_select_db($dbname, $connect) or die("Could not connect to database, error: ".mysql_error());
    	 	$user = mysql_real_escape_string($_GET['user']);
    		$figure = "figure=".mysql_result(mysql_query("SELECT look FROM users WHERE username='".$user."' LIMIT 1"),0);
    		header('Content-Type: image/png');
    		exit(file_get_contents('http://habbo.com/habbo-imaging/avatarimage?'.$figure.http_build_query($_GET)));
    
    	} 
    
    	else {
    
    		$url = 'http://habbo.com/habbo-imaging/avatarimage?figure='.http_build_query($_GET);
    		header('Content-Type: image/png');
    		exit(file_get_contents($url));
    
    	}
    
    ?>

  11. #36
    Account Upgraded | Title Enabled! Akimbo is offline
    MemberRank
    Jul 2011 Join Date
    NorwayLocation
    305Posts

    Re: Avatarimage.php script

    Quote Originally Posted by MrCR View Post
    Exactly, just make sure that the image is not when used with white background in HTML.

    Man, good job, I think you and I were the only ones thinking about avatarimage for fansite use!
    That was bad ;( I fixed a new one! Yeh, fansites are good to have, and it's cool to use for Habbo Imagers, Battle ball generators etc.. :)

    Quote Originally Posted by iRaged View Post
    Here's mine. Works with username or if you just want a look!
    Code:
    <?php 
    
    	if(isset($_GET['user'])) {
    
    	 	$host = "host";
    	 	$username = "root";
    	 	$password = "pass";
    	 	$dbname = "db";
    	 	$connect = mysql_connect($host, $username, $password) or die(mysql_error());
    	 	mysql_select_db($dbname, $connect) or die("Could not connect to database, error: ".mysql_error());
    	 	$user = mysql_real_escape_string($_GET['user']);
    		$figure = "figure=".mysql_result(mysql_query("SELECT look FROM users WHERE username='".$user."' LIMIT 1"),0);
    		header('Content-Type: image/png');
    		exit(file_get_contents('http://habbo.com/habbo-imaging/avatarimage?'.$figure.http_build_query($_GET)));
    
    	} 
    
    	else {
    
    		$url = 'http://habbo.com/habbo-imaging/avatarimage?figure='.http_build_query($_GET);
    		header('Content-Type: image/png');
    		exit(file_get_contents($url));
    
    	}
    
    ?>
    Thay was good bro :)



Page 2 of 2 FirstFirst 12

Advertisement