array( 'method' => 'GET', 'protocol_version' => 1.1, 'follow_location' => 1, 'header' => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36" ) ); if (isset($_POST['pega'])) { $xml = $_POST['xml']; $pasta = $_POST['pasta']; $pagina = $_POST['pagina']; $path_sql = "downloads/" . $pasta . "/sql.sql"; $path_xml = "downloads/" . $pasta . "/xml.txt"; $path_xml_original = "downloads/" . $pasta . "/xml_original.txt"; $path_pasta = "downloads/" . $pasta . "/mobis/"; if($_POST['icone'] == "separar") $path_icones = "downloads/" . $pasta . "/icones/"; else $path_icones = "downloads/" . $pasta . "/mobis/"; $i = 0; $xml_escreve = ""; $sql_escreve = ""; $id_pag = rand(100, 40000); $furnidata = simplexml_load_string("
" . $xml . "
"); $sql_escreve .= "INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption`) VALUES ('" . $id_pag . "', '1425622122', '" . $pagina . "');" . "\n"; @mkdir("downloads/"); @mkdir("downloads/" . $pasta); @mkdir("downloads/" . $pasta . "/mobis/"); if($_POST['icone'] == "separar") @mkdir("downloads/" . $pasta . "/icones/"); foreach ($furnidata->furnitype as $mobi) { $i++; if ($_POST['id'] == "random") $rand = rand(111, 444); else $rand = ""; /// Gera arquivo XML $xml_escreve .= '
' . "\n"; $xml_escreve .= '
'; foreach ($mobi->partcolors->color as $cor) { $xml_escreve .= "
" . $cor . "
"; } $xml_escreve .= '
' . "\n"; $xml_escreve .= '
' . $mobi->name . '
' . "\n"; $xml_escreve .= '
' . $mobi->description . '
' . "\n"; $xml_escreve .= '
' . "\n"; $xml_escreve .= '
' . $rand . $mobi['id'] . '
-1
0
' . "\n"; $xml_escreve .= '
' . "\n"; /// Gera SQL $sql_escreve .= "INSERT INTO `catalog_items` (`item_ids`, `page_id`, `catalog_name`, `offer_id`) VALUES ('" . $rand . $mobi['id'] . "', '" . $id_pag . "', '" . $mobi['classname'] . "', '" . $rand . $mobi['id'] . "');"; $sql_escreve .= "\n"; $sql_escreve .= "INSERT INTO `items_base` (`id`, `sprite_id`, `public_name`, `item_name`, `width`, `length`, `stack_height`, `allow_sit`, `interaction_type`) VALUES ('" . $rand . $mobi['id'] . "', '" . $rand . $mobi['id'] . "', '" . $mobi->name . "', '" . $mobi['classname'] . "', '" . $mobi->xdim . "', '" . $mobi->ydim . "', '0','" . $mobi->cansiton . "', 'default');" . "\n"; /// Download do mobi if (mb_strpos($mobi['classname'], '*') !== false) { $icone = str_replace("*", "_", $mobi['classname']); $mobi['classname'] = explode("*", $mobi['classname'])[0]; } else { $icone = $mobi['classname']; } if ($_POST['hotel'] == "habbocity") { copy("https://swf.habbocity.me/dcr/hof_furni/" . $mobi['classname'] . ".swf", $path_pasta . $mobi['classname'] . ".swf", stream_context_create($arrRequestHeaders)); copy("https://images.habbogroup.com/dcr/hof_furni/" . $mobi->revision . "/" . $icone . "_icon.png", $path_icones . $icone . "_icon.png"); } else if ($_POST['hotel'] == "space") { copy("https://images.spacehotel.co/hof_furni/" . $mobi['classname'] . ".swf", $path_pasta . $mobi['classname'] . ".swf", stream_context_create($arrRequestHeaders)); copy("https://images.spacehotel.co/hof_furni/icon/view.php?name=" . $mobi['classname'] . "_icon.png", $path_icones . $mobi['classname'] . "_icon.png", stream_context_create($arrRequestHeaders)); } else if ($_POST['hotel'] == "iron") { copy("https://cdn.ironhotel.biz/static_global/furniture/" . $mobi['classname'] . ".swf", $path_pasta . $mobi['classname'] . ".swf", stream_context_create($arrRequestHeaders)); copy("https://cdn.ironhotel.biz/static_global/furniture/icons/" . $mobi['classname'] . "_icon.png", $path_icones . $mobi['classname'] . "_icon.png", stream_context_create($arrRequestHeaders)); } else { copy("https://images.habbogroup.com/dcr/hof_furni/" . $mobi->revision . "/" . $mobi['classname'] . ".swf", $path_pasta . $mobi['classname'] . ".swf"); copy("https://images.habbogroup.com/dcr/hof_furni/" . $mobi->revision . "/" . $icone . "_icon.png", $path_icones . $icone . "_icon.png"); } } fwrite(fopen($path_sql, "w"), $sql_escreve); fwrite(fopen($path_xml, "w"), $xml_escreve); fwrite(fopen($path_xml_original, "w"), $xml); echo '
Sucesso!
Foram baixados '.$i.' mobis.
'; } ?>
Download do Habbo Original - habbo.com
Download do Habbocity - habbocity.me
Download do Space Hotel - spacehotel.co
Download do Iron Hotel - ironhotel.biz
Gerar ID aleatório - Get Random ID
Usar ID da XML - Get XML ID
Não separar ícones em uma nova pasta
Separar ícones em uma pasta
Download