Don't you need sso?
Edit:
Client php
PHP Code:
<?php
$this->AddCSS('/web-gallery/v2/styles/common.css');
$this->AddJS('/web-gallery/v2/js/libs2.js');
$this->AddJS('/web-gallery/v2/js/visual.js');
$this->AddJS('/web-gallery/v2/js/libs.js');
$this->AddJS('/web-gallery/v2/js/common.js');
$this->AddCSS('/web-gallery/static/styles/process.css');
$this->AddCSS('/web-gallery/static/styles/habboflashclient.css');
$this->AddJS('/web-gallery/static/js/habboflashclient.js');
$SSO = Site::RandomMD5(33, serialize(Users::$Session->Data));
Users::$Session->Update('auth_ticket', $SSO);
Users::$Session->Update('ip_last', RemoteIp);
$this->Define('SSO', $SSO);
$this->Define('Hash', '-');
$this->DefineArray('Emu', $EmuData);
$this->DefineArray('Client', $ClientData);
$this->Body['id'] = 'client';
$this->Body['class'] = 'flashclient';
$this->LoadTpl('Client-Body');
$this->Write('<script type="text/javascript">');
$this->Write('HabboView.run();');
$this->Write('</script>');
?>
Client TPL
PHP Code:
<script type="text/javascript">
var andSoItBegins = (new Date()).getTime();
var ad_keywords = "";
document.habboLoggedIn = true;
var habboName = "$Username";
var habboReqPath = "/";
var habboStaticFilePath = "/web-gallery/";
var habboImagerUrl = "http://www.habbo.nl/habbo-imaging/";
var habboPartner = "";
var habboDefaultClientPopupUrl = "/play";
window.name = "habboMain";
FlashExternalInterface.loginLogEnabled = true;
FlashExternalInterface.logLoginStep("web.view.start");
if (top == self)
{
FlashHabboClient.cacheCheck();
}
var flashvars = {
"client.allow.cross.domain" : "1",
"client.notify.cross.domain" : "1",
"connection.info.host" : "MY-IP-GOES-HERE",
"connection.info.port" : "PORT",
"site.url" : "http://url.com",
"url.prefix" : "",
"client.reload.url" : "/client",
"client.fatal.error.url" : "/client/error",
"client.connection.failed.url" : "/client/error",
"external.variables.txt" : "http://url.com/swfs/external_variables.txt",
"external.texts.txt" : "http://url.com/swfs/external_flash_texts.txt",
"productdata.load.url" : "http://url.com/swfs/productdata.txt",
"furnidata.load.url" : "http://url.com/swfs/furnidata.txt",
"use.sso.ticket" : "1",
"sso.ticket" : "$SSO",
"processlog.enabled" : "1",
"account_id" : "$User_id",
"client.starting" : "$Username we are currently loading content needed to load!...",
"flash.client.url" : "/client",
"user.hash" : "<?php echo sha1(USER_ID); ?>",
"flash.client.origin" : "popup"
};
var params = {
"base" : "http://url.com/swfs/",
"allowScriptAccess" : "always",
"menu" : "false"
};
if (!(HabbletLoader.needsFlashKbWorkaround()))
{
params["wmode"] = "opaque";
}
swfobject.embedSWF("http://url.com/SWF.swf", "flash-container", "100%", "100%", "10.0.0", "/web-gallery/flash/expressInstall.swf", flashvars, params);
window.onbeforeunload = unloading;
function unloading()
{
var clientObject;
if (navigator.appName.indexOf("Microsoft") != -1)
{
clientObject = window["flash-container"];
}
else
{
clientObject = document["flash-container"];
}
try
{
clientObject.unloading();
}
catch (e)
{
}
}
</script>
<div id="overlay"></div>
<div id="client-ui" >
<div id="flash-wrapper">
<div id="flash-container">
<div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none">
</div>
<script type="text/javascript">
$('content').show();
</script>
</div>
</div>
<div id="content" class="client-content"></div>
</div>