heyy guys,
I found a new methode to still get the avatars from habbo becouse file_get_contens isn`t working anymore.
it caches the avatars in the avatars folder, u can always change that to a other folder.
it is maybe bad coded but u can always modified and share it with us
sorry for my bad english
I found a new methode to still get the avatars from habbo becouse file_get_contens isn`t working anymore.
it caches the avatars in the avatars folder, u can always change that to a other folder.
PHP:
<?php
header('Content-Type: image/png');
$map = './avatars'; //the map where everything will be saved
if (!is_dir($map))
{
if (!mkdir($map, 0, true))
{
die('Cant make the folder chmod this folder');
}
}
$figure = $_GET['figure'];
if(isset($_GET['size'])){
$size = $_GET['size'];
} else {
$size= 'b';
}
if(isset($_GET['direction'])){
$direction = $_GET['direction'];
} else {
$direction = '2';
}
if(isset($_GET['head_direction'])){
$head = $_GET['head_direction'];
} else {
$head = '2';
}
if(isset($_GET['gesture'])){
$gesture = $_GET['gesture'];
} else {
$gesture = '';
}
$lookhash = md5("$figure$size$direction$head$gesture");
if (file_exists("$map/$lookhash.png")) {
$finalavatar = require("$map/$lookhash.png");
} else {
function downloadavatar($image_url, $image_file){
$fp = fopen ($image_file, 'w+');
$ch = curl_init($image_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FILE, $fp);
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($fp);
}
downloadavatar("https://www.habbo.nl/habbo-imaging/avatarimage?figure=".$figure."&size=".$size."&direction=".$direction."&head_direction=".$head."&gesture=".$gesture."", "$map/$lookhash.png");
$finalavatar = require("$map/$lookhash.png");
}
echo $finalavatar;
?>
it is maybe bad coded but u can always modified and share it with us
sorry for my bad english