Hi.
Since Habbos new anti-ddos stuff you cannot just load avatarimages directely from Habbo. Use this script instead:
Paste.ee - View paste BjxmI
Easy to use:
http://hotel.url/avatar.php?figure=%look%
enjoy.
Printable View
Hi.
Since Habbos new anti-ddos stuff you cannot just load avatarimages directely from Habbo. Use this script instead:
Paste.ee - View paste BjxmI
Easy to use:
http://hotel.url/avatar.php?figure=%look%
enjoy.
Or.. Or.. you could just use your own imaging :)
Also it's nice for people who don't want to take the time to do ^^ That
if you want to keep using file_get_contents instead of curl, use this:
PHP Code:$target = '<url here>';
$options = stream_context_create(array('http' => array('user_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12')));
$result = file_get_contents($target, false, $options);
Are we really going to (re-)edit PHP scripts nowadays? --> http://forum.ragezone.com/f353/habbo...-anti-1085999/
Oh well, here are some "fixes". I just took a quick look.
PHP Code:define('DEVMODE', false); // <-- remove this line
PHP Code:http_build_query($_GET); // <-- remove this line
$hash = sha1(http_build_query($_GET).'SDJkt325JAEKj');
PHP Code:$path = FOLDER.'/'.Hashit().'.png'; // <-- add this line
if(file_exists($path)) // <-- edit this line
{
// return require(FOLDER.'/'.Hashit().'.png'); <-- replace this line
return $path;
PHP Code:function Avatar()
{
$create = fopen(FOLDER.'/'.Hashit().'.png', 'w+');
$ch = curl_init('https://'.HOTEL.'/habbo-imaging/avatarimage?figure='.http_build_query($_GET));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FILE, $create);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
curl_exec($ch);
curl_close($ch);
fclose($create);
return GetCache(); // <-- remove this line
}
/* Replace this
if(GetCache() != 0 AND DEVMODE == false)
{
echo GetCache();
exit;
}
else
{
echo Avatar();
exit;
} */
if (GetCache() === 0)
{
Avatar();
}
readfile(GetCache());
Could u make any with like http://hotel.url/avatar.php?name=trolls?
Is there any other solutions out there? Habbo keeps banning my IP's from accessing their data.
function avatarURL($figure,$style,$return = 0){
if($figure == "self"){ $figure = $this->figure; }
$figure = $GLOBALS['input']->HoloText($figure);
$hash = md5($figure.strtolower($style));
$style = explode(",", $style);
if($style[0] == "s"){ $style[6] = "1"; }else{ $style[6] = "0"; }
if($style[3] == "sml"){ $style[7] = "1"; }else{ $style[7] = "0"; }
$expandedstyle = "s-".$style[6].".g-".$style[7].".d-".$style[1].".h-".$style[2].".a-0";
if(file_exists("./cache/avatars/".$figure.",".$expandedstyle.",".$hash.".png")){
$URL = "http://URL/habbo-imaging/avatar/".$figure.",".$expandedstyle.",".$hash.".gif";
}!file_exists("./cache/avatars/".$figure.",".$expandedstyle.",".$hash.".png")){
$URL = "http://www.habbo.de/habbo-imaging/avatarimage?figure=".$figure."&size=".$style[0]."&direction=".$style[1]."&head_direction=".$style[2]."&crr=".$style[5]."&gesture=".$style[3]."&frame=".$style[4];
$options = stream_context_create(array('http' => array('user_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12')));
$i = file_get_contents($URL, false, $options);
$f = fopen("./cache/avatars/".$figure.",".$expandedstyle.",".$hash.".png","w+");
fwrite($f,$i);
fclose($f);
$URL = "http://URL/habbo-imaging/avatar/".$figure.",".$expandedstyle.",".$hash.".gif";
}
if($return == 0){ return $URL; }else{ return $hash; }
}
how to call the function:
<?php echo avatarURL("".$yourfigure."","b,3,3,sml,1,0"); ?>
add this in htaacees or convert to web.config
RewriteRule ^habbo-imaging/avatar/(.*),(.*),(.*).gif$ ./cache/avatars/$1,$2,$3.png
i keep getting 404 not found when i use this script