Hilfe by CMS pack von Zonatic

  • Client.php

    Spoiler anzeigen

    <?php
    ob_start();
    session_start();
    define("ITS_OK", true);

    require_once("./inc/config.php");
    require_once("./inc/functions.php");
    require_once("./inc/lang.php");

    if(!isUserLoggedIn()) { header("Location: ".cmsSettings("site_url")."home"); }

    if(isMaintenance())
    {
    header("Location: ".cmsSettings("site_url")."maintenance");
    }

    $SSO = SSO();
    mysql_query("UPDATE users SET auth_ticket = '', auth_ticket = '".$SSO."', last_online = '".protect(time())."', ip_last = '', ip_last = '".protect($_SERVER["REMOTE_ADDR"])."' WHERE id = '".userInfo(protect($_SESSION["login_username"]), "id")."'") or die(mysql_error());
    ?>
    <!DOCTYPE html>
    <html lang="de">
    <head>
    <title><?php echo cmsSettings("site_name"); ?>: Client</title>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="<?php echo cmsSettings("site_desc"); ?>">
    <meta name="keywords" content="<?php echo cmsSettings("site_keys"); ?>">

    <script type="text/javascript">
    var andSoItBegins = (new Date()).getTime();
    </script>

    <link rel="shortcut icon" href="<?php echo cmsSettings("site_url"); ?>favicon.ico">
    <script src="<?php echo cmsSettings("site_url"); ?>client/libs2.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/visual.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/libs.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/common.js" type="text/javascript"></script>

    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/common.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/process.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/client/style.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/css/alertify.corec.css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/css/alertifyc.default.css" />

    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/habboflashclient.css" type="text/css" />
    <script src="<?php echo cmsSettings("site_url"); ?>client/habboflashclient.js" type="text/javascript"></script>
    <script type="text/javascript" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/js/alertify.js"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/custom.js?<?php echo rand(10000, 99999); ?>" type="text/javascript"></script>

    <script type="text/javascript">
    document.habboLoggedIn = true;
    var habboName = "<?php echo userInfo(protect($_SESSION["login_username"]), "username"); ?>";
    var habboId = <?php echo userInfo(protect($_SESSION["login_username"]), "id"); ?>;
    var facebookUser = false;
    var habboReqPath = "<?php echo cmsSettings("site_url"); ?>client";
    var habboStaticFilePath = "http://images-eu.habbo.com/habboweb/<?php echo cmsSettings("habbo_build"); ?>/web-gallery";
    var habboImagerUrl = "http://www.habbo.de/habbo-imaging/";
    var habboPartner = "";
    var habboDefaultClientPopupUrl = "<?php echo cmsSettings("site_url"); ?>client.php";
    window.name = "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>";
    if (typeof HabboClient != "undefined") {
    HabboClient.windowName = "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>";
    }
    </script>
    <noscript>
    <meta http-equiv="refresh" content="0;url=/client/nojs"/>
    </noscript>

    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubu…ld&subset=Latin">

    <script type="text/javascript">
    function DoResize()
    {
    var nHeight;
    if (typeof window.innerHeight == 'undefined')
    {
    nHeight = document.body.clientHeight -200;
    }
    else
    {
    nHeight = window.innerHeight -200;
    }

    document.getElementById('flash').style.height = nHeight+'px';
    }

    FlashExternalInterface.loginLogEnabled = true;
    FlashExternalInterface.logLoginStep("web.view.start");

    if (top == self) {
    FlashHabboClient.cacheCheck();
    }
    var flashvars = {
    "client.allow.cross.domain": "1",
    "client.notify.cross.domain": "0",
    "connection.info.host": "[IP]",
    "connection.info.port": "3000",
    "site.url": "<?php echo cmsSettings("site_url"); ?>/clienterror",
    "url.prefix": "<?php echo cmsSettings("site_url"); ?>",
    "client.reload.url": "<?php echo cmsSettings("site_url"); ?>client.php",
    "client.fatal.error.url": "<?php echo cmsSettings("site_url"); ?>clienterror",
    "client.connection.failed.url": "<?php echo cmsSettings("site_url"); ?>clienterror",
    "external.variables.txt": "http://[IP]/game/external_variables.txt",
    "external.texts.txt": "http://[IP]/game/external_flash_texts.txt",
    "external.override.variables.txt": "http://[IP]/game/external_override_variables.txt",
    "external.override.texts.txt": "http://[IP]/game/external_flash_override_texts.txt",
    "productdata.load.url": "http://[IP]/game/productdata.txt",
    "furnidata.load.url": "http://[IP]/game/furnidata_xml.xml",
    "use.sso.ticket": "1",
    "sso.ticket": "<?php echo userInfo(protect($_SESSION["login_username"]), "auth_ticket"); ?>",
    "safechat.list.txt": "http://[IP]/game/safechat-en.txt",
    "hotelview.banner.url":"http://[IP]/game/rs4.php",
    "processlog.enabled": "1",
    "account_id": "<?php echo userInfo(protect($_SESSION["login_username"]), "id"); ?>",
    "client.starting": "<?php echo cmsSettings("site_name")." ".$lng["loading_hotel"]; ?>",
    "flash.client.url": "http://[IP]/game/",
    "user.hash": "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>",
    "has.identity": "1",
    "flash.client.origin": "popup",
    "forward.type" : "2",
    "forward.id" : "0"
    };

    var params = {
    "base" : "http://[IP]/game/",
    "allowScriptAccess" : "always",
    "menu" : "false"

    };

    params["wmode"] = "opaque";
    FlashExternalInterface.signoutUrl = "<?php echo cmsSettings("site_url"); ?>logout";
    var clientUrl = "http://[IP]/game/RELEASE63-201401301855-255051757.swf";

    swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "10.0.0", "http://images-eussl.habbo.com/<?php echo cmsSettings("habbo_build"); ?>/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) {}
    }
    window.onresize = DoResize;
    window.onresize = DoResize;
    </script>

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

    <script type="text/javascript">
    var z = 1;
    function showDialog(id, xx)
    {
    document.getElementById("hotelalert_" + id).style.display = "block";
    document.getElementById("hotelalert_" + id).style.zIndex = z++;
    $("#hotelalert_" + id).draggable();

    if(id == 1) { loadEvents(); }
    if(id == 2) { loadTopUsers(); }
    if(id == 3) { loadCouples(); }
    if(id == 4) { loadYT(); }
    if(id == 5) { loadPL(xx); }
    if(id == 6) { loadPLK(); }
    if(id == 7) { loadBS(); cookies(); }
    if(id == 10) { editMyBot(xx); }
    }
    function refreshDialog(id)
    {
    document.getElementById("hotelalert_" + id).style.zIndex = z++;
    }

    function hideDialog(id) {
    $("#hotelalert_" + id).fadeOut();
    }

    function usersOnline() {
    var senddata = current_url() + "ajax/userscounter.php";
    $.ajax({
    async:false,
    cache:false,
    url:senddata,
    type:"GET",
    dataType:"text",
    success:function (data) {
    $("#onlineUsers").html(data);
    }
    });
    window.setTimeout(usersOnline, 3000);
    }

    function current_url() {
    return "templates/<?php echo cmsSettings("site_template"); ?>/";
    }

    function showBtns () {
    document.getElementById("clientBar").style.display = "block";
    window.setTimeout(usersOnline, 3000);
    }
    window.setTimeout(showBtns, 14000);
    </script>

    <style type="text/css">
    @font-face {
    font-family: 'ubuntu-regular';
    font-style: normal;
    font-weight: normal;
    src: url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/fonts/ubuntu.ttf') format('truetype');
    }
    .clientwindow{position:absolute;z-index:1;border-style:solid;border-width:33px 6px 7px;-moz-border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 repeat;-webkit-border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 repeat;-o-border-image:url(../img/client/box_clientwindow.png) 33 6 7 repeat;border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 fill repeat;padding-top:5px;}
    .clientwindow .closebtn{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_btn.png');width:19px;height:20px;float:right;margin-top:-30px;}
    .clientwindow .closebtn:hover{background-position:38px 0;}.clientwindow .closebtn:active{background-position:19px 0;}
    .clientwindow .heading{position:absolute;top:-22px;font-weight:bold;font-size:12px;text-align:center;width:100%;z-index:-1;}
    .hotelalert{background:#E9E9E1;height:400px;border:1px solid black;border-bottom:2px solid black;border-radius:4px;display:none;width:380px;margin:0px 15px;box-shadow:inset 0px 0px 0px 2px white,0px 0px 20px 0px black;color:#666666;margin:0 auto;position:absolute;left: 38%;top:57px;z-index:999999999999999999;}
    .hotelalert>.head{height:31px;background:#D39A5B;border-radius:3px 3px 0px 0px;border:2px solid #FBB469;border-bottom:1px solid black;text-align:center;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .hotelalert>#close{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_normal.png');width:19px;cursor:pointer;background-repeat:no-repeat;background-position:0 center;height:31px;float:right;margin-right:10px;}.hotelalert>#close:hover{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_normal_hover.png');}.event{height:39px;background-color:#F0F0F0;border:1px solid #E5E5E5;border-radius:5px;position:relative;margin-right:3px;margin-bottom:3px;background-repeat:no-repeat;background-position:6px center;background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/waiting.png');}.event.active{background-color:#B3EAFF;border:1px solid #BADAE9;background-position:10px center;background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/running.png');}.event .name{position:absolute;color:rgba(0,0,0,0.8);font-size:15px;font-weight:bold;margin-left:40px;margin-top:5px;}.event .desc{position:absolute;color:rgba(0,0,0,0.6);margin-top:22px;margin-left:40px;}.event .time{position:absolute;right:10px;margin-top:5px;color:rgba(0,0,0,0.4);}b{font-weight:bold;}
    .h_red{height:31px;background:#D35B5B;border-radius:3px 3px 0px 0px;border:2px solid #FB6969;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_green{height:31px;background:#69c440;border-radius:3px 3px 0px 0px;border:2px solid #80d25b;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_orange{height:31px;background:#d5521f;border-radius:3px 3px 0px 0px;border:2px solid #e36f42;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_blue{height:31px;background:#367897;border-radius:3px 3px 0px 0px;border:2px solid #408CAF;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_pink{height:31px;background:#65182B;border-radius:3px 3px 0px 0px;border:2px solid #7b3345;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .clientshop { width: 590px; height: 613px; }
    .kekse { font-weight:bold;margin-top:-20px; font-size:15px; }
    .shopline { cursor: default; font-size: 12px; background: #203640; color: white; padding: 15px; border: 2px solid #3E6575; }
    .clientBar { padding: 7px 5px;background:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/top.png"; ?>') repeat scroll 0 0 transparent;border-bottom:1px solid #33352D; text-shadow: 1px 1px 1px black; border-radius: 4px;height:31px;width:100%;z-index:1;}
    .cursor { transition:opacity 1s; }
    .cursor:hover { cursor: pointer; opacity: 0.7; }
    #onlineUsers { float:left;margin-top: 8px;margin-left:10px;font-weight: bold; text-shadow: 1px 1px 0px grey; }
    </style>
    </head>
    <body style="overflow: hidden; cursor: auto;width: 100%; position: fixed;" id="client" class="flashclient">
    <div id="window_overlay"></div>
    <div class="hotelalert" id="hotelalert_1" onMouseDown="refreshDialog(1);">
    <div id="close" onClick="hideDialog(1);"></div>
    <div class="h_blue">Spiele</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="eeevents"></div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_2" onMouseDown="refreshDialog(2);">
    <div id="close" onClick="hideDialog(2);"></div>
    <div class="h_orange">Top 5</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="top_users">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_3" onMouseDown="refreshDialog(3);">
    <div id="close" onClick="hideDialog(3);"></div>
    <div class="h_pink">Beziehungs-System</div>
    <div style="height: 365px">
    <div style="padding:0 10px;" class="couple_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_4" onMouseDown="refreshDialog(4);">
    <div id="close" onClick="hideDialog(4);"></div>
    <div class="h_red">YouTube Playlists</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="yt_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_5" onMouseDown="refreshDialog(5);">
    <div id="close" onClick="hideDialog(5);"></div>
    <div class="h_red playlist_title">-/- Playlist</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="playlist_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_6" onMouseDown="refreshDialog(6);">
    <div id="close" onClick="hideDialog(6);"></div>
    <div class="h_green">Meine Playlist - Verwalten</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="playlist_config">

    </div>
    </div>
    </div>
    <div class="hotelalert clientshop" id="hotelalert_7" onMouseDown="refreshDialog(7);">
    <div id="close" onClick="hideDialog(7);"></div>
    <div class="h_blue">Client Shop</div>
    <div class="shopline">
    <div class="left" style="margin-top:11px;">
    <img src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_1.png"; ?>" />
    </div>
    <div class="left" style="margin-left:10px;">
    <b style="font-size:15px;">Willkommen im <?php echo cmsSettings("site_name"); ?> Katalog!</b><br />
    Was immer dir bei <?php echo cmsSettings("site_name"); ?> am besten gef&auml;llt.
    </div>
    <div class="right">
    <span class="kekse"></span> <img src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/iconbig_kekse.png"; ?>" />
    </div>
    <div class="clear"></div>
    </div>
    <div style="padding: 10px 0 10px 10px;" class="clientShop">

    </div>
    </div>
    <div class="hotelalert" style="height: 500px;width:420px;" id="hotelalert_10" onMouseDown="refreshDialog(10);">
    <div id="close" onClick="hideDialog(10);"></div>
    <div class="h_blue" id="botTitle">Bot bearbeiten</div>
    <div>
    <div style="padding: 10px;" class="editBotPnl">

    </div>
    </div>
    </div>
    <div class="clientBar" id="clientBar" style="display:none;">
    <div class="left">
    <img class="cursor" onClick="showDialog(1, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_events.png"; ?>" />
    <img class="cursor" onClick="showDialog(2, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/top_icon.png"; ?>" />
    <img class="cursor" onClick="showDialog(3, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_liebe.png"; ?>" />
    <img class="cursor" onClick="showDialog(4, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_youtube.png"; ?>" />
    <img class="cursor" onClick="showDialog(7, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_client_shop.png"; ?>" />
    </div>
    <div id="onlineUsers">
    <?php echo getServerStatus("users_online"); ?> Mitglieder online
    </div>
    <div class="clear"></div>
    </div>

    <div id="windows"></div>
    <div id="overlay"></div>
    <div id="client-ui" style="height: 94.1%">
    <div id="flash-wrapper">
    <div id="flash-container">
    <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none">
    <div class="cbb clearfix">
    <h2 class="title">Bitte besorg dir die neueste Adobe Flash Player Version.</h2>
    <div class="box-content">
    <p>Hier kannst Du den Adobe Flashplayer herunterladen und installieren: <a href="http://get.adobe.com/flashplayer/">Install flash player</a>. Mehr Informationen und Anweisungen zur Installation sind hier zu finden: <a href="http://www.adobe.com/products/flash…o/instructions/">Mehr Informationen</a></p>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/63_1d…lash_player.gif" alt="Get Adobe Flash player"/></a></p>
    </div>
    </div>
    </div>
    <noscript>
    <div style="width: 400px; margin: 20px auto 0 auto; text-align: center">
    <p>Wenn du nicht automatisch weitergeleitet wirst <a href="/client/nojs">klick hier</a></p>
    </div>
    </noscript>
    </div>
    </div>
    </div>
    <div id="content" class="client-content"></div>
    </body></html>

    Config Emulator:

    Spoiler anzeigen


    ## uberEmulator System Configuration File
    ## Must be edited for the server to work

    ## MySQL Configuration
    db.hostname=localhost
    db.port=3306
    db.username=root
    db.password=PASS
    db.name=silver

    ## MySQL pooling setup (controls amount of connections)
    db.pool.minsize=10
    db.pool.maxsize=500

    ## Game TCP/IP Configuration
    game.tcp.bindip=[IP]
    game.tcp.port=30000
    game.tcp.conlimit=11000
    game.tcp.conperip=100
    game.tcp.enablenagles=true

    ## MUS TCP/IP Configuration
    mus.tcp.bindip=[IP]
    mus.tcp.port=30001
    mus.tcp.allowedaddr=127.0.0.1

    ## Client configuration
    client.ping.enabled=1
    client.ping.interval=20000
    client.maxrequests=300

    food.url=http://[IP]/game/gamecenter/gamecenter_basejump/
    food.ip=[IP]
    food.port=30005


    rs4.php

    Spoiler anzeigen

    <?php
    /*
    * Class by Burak, original banner by capostrike93
    **/
    Class Banner{
    var $width;
    var $height;
    var $pixels;
    var $token;
    var $prime;
    var $generator;
    public function __construct(){
    $this->width = 100;
    $this->height = 114;
    }
    public function LoadPixels($filename){
    $this->pixels = file_get_contents($filename);
    }
    public function SetToken($token){
    $this->token = $token;
    }
    public function LoadDHfromServer($host, $port){
    if(filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)){
    $host = gethostbyname($host);
    }

    $fp = fsockopen($host, $port, $errno, $errstr, 1);

    if (!is_resource($fp)) return false;

    $packet = 'GET'.chr(1).$this->token;

    fwrite($fp, $packet);
    fflush($fp);
    stream_set_timeout($fp, 1);

    $data = fgets($fp, 512);
    list($this->prime, $this->generator) = explode(':', $data);

    fclose($fp);
    }
    public function LoadDHfromStatic($prime, $generator){
    $this->prime = $prime;
    $this->generator = $generator;
    }
    public function Calculate(){
    $insert = chr(strlen($this->prime)).$this->prime.chr(strlen($this->generator)).$this->generator;

    $Length = strlen($this->token);
    $Length2 = strlen($insert);
    $p = 0;
    $bitsnum = "";

    for($i=0;$i<$Length2;$i++){
    $bits = base_convert(ord($insert[$i]) ^ ord($this->token[$p]),10,2);
    $need = 8 - strlen($bits);
    for($o=0;$o<$need;$o++)$bits = "0".$bits;
    $bitsnum .= $bits;
    if (++$p == $Length) $p = 0;
    }

    $insertpos = 0;
    $Length = strlen($bitsnum);
    for ($y = 39; $y < 69; $y++)
    {
    $a = 0;
    for ($r = 4; $r < 84; $r++)
    {
    $pos = (($y + $a) * $this->width + $r) * 4;
    $b = 1;
    while ($b < 4)
    {
    if($insertpos < $Length)
    {
    $binaryData = base_convert(ord($this->pixels[$pos + $b]),10,2);
    $need = 8 - strlen($binaryData);
    for($o=0;$o<$need;$o++) $binaryData = "0".$binaryData;
    $binaryData[7] = $bitsnum[$insertpos];
    $this->pixels[$pos + $b] = chr(base_convert($binaryData,2,10));
    $insertpos++;$b++;
    continue;
    }
    break 3;
    }
    if ($r % 2 == 0) $a++;
    }
    }
    }
    public function Build(){
    $img=imagecreatetruecolor($this->width, $this->height);
    imagealphablending($img, false);
    imagesavealpha($img, true);
    $x=0;
    $y=0;
    $colors=unpack("N*", $this->pixels);
    foreach($colors as $color)
    {
    imagesetpixel($img, $x, $y, (0x7f-($color>>25)<<24)|($color&0xffffff));
    if(++$x==$this->width)
    {$x=0;$y++;}
    }
    header('Content-Type: image/png');
    imagepng($img);
    }
    }

    $banner = new Banner;
    $banner->LoadPixels('banner.txt');

    if(isset($_GET['token']) && strlen($_GET['token']) == 40){
    $banner->SetToken(trim($_GET['token']));
    //$banner->LoadDHfromServer("127.0.0.1", 300);
    $banner->LoadDHfromStatic("114670925920269957593299136150366957983142588366300079186349531", "1589935137502239924254699078669119674538324391752663931735947");
    $banner->Calculate();
    }

    $banner->Build();
    ?>

  • Wenn ihr mal richtig auf den emulator gucken würdet, dann währe es doch viel leichter es zu verstehen.

    Die packets werden übermittelt und zurück geworfen. Das ergibt dann die Sockets die hin und her wandern.
    Das bedeutet das der Emu richtig eingestellt ist.

    Du hast entweder die SWF nicht drin
    Oder einfach die Pfads nicht richtig eingestellt.

    Schau einfach nochmal nach.

    Mit freundlichen GrüßenMit freundlichen Grüßen

  • Hier nochmal alles:

    Client.php

    Spoiler anzeigen

    <?php
    ob_start();
    session_start();
    define("ITS_OK", true);

    require_once("./inc/config.php");
    require_once("./inc/functions.php");
    require_once("./inc/lang.php");

    if(!isUserLoggedIn()) { header("Location: ".cmsSettings("site_url")."home"); }

    if(isMaintenance())
    {
    header("Location: ".cmsSettings("site_url")."maintenance");
    }

    $SSO = SSO();
    mysql_query("UPDATE users SET auth_ticket = '', auth_ticket = '".$SSO."', last_online = '".protect(time())."', ip_last = '', ip_last = '".protect($_SERVER["REMOTE_ADDR"])."' WHERE id = '".userInfo(protect($_SESSION["login_username"]), "id")."'") or die(mysql_error());
    ?>
    <!DOCTYPE html>
    <html lang="de">
    <head>
    <title><?php echo cmsSettings("site_name"); ?>: Client</title>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="<?php echo cmsSettings("site_desc"); ?>">
    <meta name="keywords" content="<?php echo cmsSettings("site_keys"); ?>">

    <script type="text/javascript">
    var andSoItBegins = (new Date()).getTime();
    </script>

    <link rel="shortcut icon" href="<?php echo cmsSettings("site_url"); ?>favicon.ico">
    <script src="<?php echo cmsSettings("site_url"); ?>client/libs2.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/visual.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/libs.js" type="text/javascript"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/common.js" type="text/javascript"></script>

    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/common.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/process.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/client/style.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/css/alertify.corec.css" />
    <link rel="stylesheet" href="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/css/alertifyc.default.css" />

    <link rel="stylesheet" href="<?php echo cmsSettings("site_url"); ?>client/habboflashclient.css" type="text/css" />
    <script src="<?php echo cmsSettings("site_url"); ?>client/habboflashclient.js" type="text/javascript"></script>
    <script type="text/javascript" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/js/alertify.js"></script>
    <script src="<?php echo cmsSettings("site_url"); ?>client/custom.js?<?php echo rand(10000, 99999); ?>" type="text/javascript"></script>

    <script type="text/javascript">
    document.habboLoggedIn = true;
    var habboName = "<?php echo userInfo(protect($_SESSION["login_username"]), "username"); ?>";
    var habboId = <?php echo userInfo(protect($_SESSION["login_username"]), "id"); ?>;
    var facebookUser = false;
    var habboReqPath = "<?php echo cmsSettings("site_url"); ?>client";
    var habboStaticFilePath = "http://images-eu.habbo.com/habboweb/<?php echo cmsSettings("habbo_build"); ?>/web-gallery";
    var habboImagerUrl = "http://www.habbo.de/habbo-imaging/";
    var habboPartner = "";
    var habboDefaultClientPopupUrl = "<?php echo cmsSettings("site_url"); ?>client.php";
    window.name = "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>";
    if (typeof HabboClient != "undefined") {
    HabboClient.windowName = "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>";
    }
    </script>
    <noscript>
    <meta http-equiv="refresh" content="0;url=/client/nojs"/>
    </noscript>

    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubu…ld&subset=Latin">

    <script type="text/javascript">
    function DoResize()
    {
    var nHeight;
    if (typeof window.innerHeight == 'undefined')
    {
    nHeight = document.body.clientHeight -200;
    }
    else
    {
    nHeight = window.innerHeight -200;
    }

    document.getElementById('flash').style.height = nHeight+'px';
    }

    FlashExternalInterface.loginLogEnabled = true;
    FlashExternalInterface.logLoginStep("web.view.start");

    if (top == self) {
    FlashHabboClient.cacheCheck();
    }
    var flashvars = {
    "client.allow.cross.domain": "1",
    "client.notify.cross.domain": "0",
    "connection.info.host": "[IP]",
    "connection.info.port": "3000",
    "site.url": "<?php echo cmsSettings("site_url"); ?>/clienterror",
    "url.prefix": "<?php echo cmsSettings("site_url"); ?>",
    "client.reload.url": "<?php echo cmsSettings("site_url"); ?>client.php",
    "client.fatal.error.url": "<?php echo cmsSettings("site_url"); ?>clienterror",
    "client.connection.failed.url": "<?php echo cmsSettings("site_url"); ?>clienterror",
    "external.variables.txt": "http://[IP]/game/external_variables.txt",
    "external.texts.txt": "http://[IP]/game/external_flash_texts.txt",
    "external.override.variables.txt": "http://[IP]/game/external_override_variables.txt",
    "external.override.texts.txt": "http://[IP]/game/external_flash_override_texts.txt",
    "productdata.load.url": "http://[IP]/game/productdata.txt",
    "furnidata.load.url": "http://[IP]/game/furnidata_xml.xml",
    "use.sso.ticket": "1",
    "sso.ticket": "<?php echo userInfo(protect($_SESSION["login_username"]), "auth_ticket"); ?>",
    "safechat.list.txt": "http://[IP]/game/safechat-en.txt",
    "hotelview.banner.url":"http://[IP]/game/rs4.php",
    "processlog.enabled": "1",
    "account_id": "<?php echo userInfo(protect($_SESSION["login_username"]), "id"); ?>",
    "client.starting": "<?php echo cmsSettings("site_name")." ".$lng["loading_hotel"]; ?>",
    "flash.client.url": "http://[IP]/game/",
    "user.hash": "<?php echo sha1(userInfo(protect($_SESSION["login_username"]), "username")); ?>",
    "has.identity": "1",
    "flash.client.origin": "popup",
    "forward.type" : "2",
    "forward.id" : "0"
    };

    var params = {
    "base" : "http://[IP]/game/",
    "allowScriptAccess" : "always",
    "menu" : "false"

    };

    params["wmode"] = "opaque";
    FlashExternalInterface.signoutUrl = "<?php echo cmsSettings("site_url"); ?>logout";
    var clientUrl = "http://[IP]/game/RELEASE63-201401301855-255051757.swf";

    swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "10.0.0", "http://images-eussl.habbo.com/<?php echo cmsSettings("habbo_build"); ?>/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) {}
    }
    window.onresize = DoResize;
    window.onresize = DoResize;
    </script>

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

    <script type="text/javascript">
    var z = 1;
    function showDialog(id, xx)
    {
    document.getElementById("hotelalert_" + id).style.display = "block";
    document.getElementById("hotelalert_" + id).style.zIndex = z++;
    $("#hotelalert_" + id).draggable();

    if(id == 1) { loadEvents(); }
    if(id == 2) { loadTopUsers(); }
    if(id == 3) { loadCouples(); }
    if(id == 4) { loadYT(); }
    if(id == 5) { loadPL(xx); }
    if(id == 6) { loadPLK(); }
    if(id == 7) { loadBS(); cookies(); }
    if(id == 10) { editMyBot(xx); }
    }
    function refreshDialog(id)
    {
    document.getElementById("hotelalert_" + id).style.zIndex = z++;
    }

    function hideDialog(id) {
    $("#hotelalert_" + id).fadeOut();
    }

    function usersOnline() {
    var senddata = current_url() + "ajax/userscounter.php";
    $.ajax({
    async:false,
    cache:false,
    url:senddata,
    type:"GET",
    dataType:"text",
    success:function (data) {
    $("#onlineUsers").html(data);
    }
    });
    window.setTimeout(usersOnline, 3000);
    }

    function current_url() {
    return "templates/<?php echo cmsSettings("site_template"); ?>/";
    }

    function showBtns () {
    document.getElementById("clientBar").style.display = "block";
    window.setTimeout(usersOnline, 3000);
    }
    window.setTimeout(showBtns, 14000);
    </script>

    <style type="text/css">
    @font-face {
    font-family: 'ubuntu-regular';
    font-style: normal;
    font-weight: normal;
    src: url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/fonts/ubuntu.ttf') format('truetype');
    }
    .clientwindow{position:absolute;z-index:1;border-style:solid;border-width:33px 6px 7px;-moz-border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 repeat;-webkit-border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 repeat;-o-border-image:url(../img/client/box_clientwindow.png) 33 6 7 repeat;border-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/box_clientwindow.png') 33 6 7 fill repeat;padding-top:5px;}
    .clientwindow .closebtn{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_btn.png');width:19px;height:20px;float:right;margin-top:-30px;}
    .clientwindow .closebtn:hover{background-position:38px 0;}.clientwindow .closebtn:active{background-position:19px 0;}
    .clientwindow .heading{position:absolute;top:-22px;font-weight:bold;font-size:12px;text-align:center;width:100%;z-index:-1;}
    .hotelalert{background:#E9E9E1;height:400px;border:1px solid black;border-bottom:2px solid black;border-radius:4px;display:none;width:380px;margin:0px 15px;box-shadow:inset 0px 0px 0px 2px white,0px 0px 20px 0px black;color:#666666;margin:0 auto;position:absolute;left: 38%;top:57px;z-index:999999999999999999;}
    .hotelalert>.head{height:31px;background:#D39A5B;border-radius:3px 3px 0px 0px;border:2px solid #FBB469;border-bottom:1px solid black;text-align:center;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .hotelalert>#close{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_normal.png');width:19px;cursor:pointer;background-repeat:no-repeat;background-position:0 center;height:31px;float:right;margin-right:10px;}.hotelalert>#close:hover{background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/close_normal_hover.png');}.event{height:39px;background-color:#F0F0F0;border:1px solid #E5E5E5;border-radius:5px;position:relative;margin-right:3px;margin-bottom:3px;background-repeat:no-repeat;background-position:6px center;background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/waiting.png');}.event.active{background-color:#B3EAFF;border:1px solid #BADAE9;background-position:10px center;background-image:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template"); ?>/img/client/running.png');}.event .name{position:absolute;color:rgba(0,0,0,0.8);font-size:15px;font-weight:bold;margin-left:40px;margin-top:5px;}.event .desc{position:absolute;color:rgba(0,0,0,0.6);margin-top:22px;margin-left:40px;}.event .time{position:absolute;right:10px;margin-top:5px;color:rgba(0,0,0,0.4);}b{font-weight:bold;}
    .h_red{height:31px;background:#D35B5B;border-radius:3px 3px 0px 0px;border:2px solid #FB6969;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_green{height:31px;background:#69c440;border-radius:3px 3px 0px 0px;border:2px solid #80d25b;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_orange{height:31px;background:#d5521f;border-radius:3px 3px 0px 0px;border:2px solid #e36f42;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_blue{height:31px;background:#367897;border-radius:3px 3px 0px 0px;border:2px solid #408CAF;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .h_pink{height:31px;background:#65182B;border-radius:3px 3px 0px 0px;border:2px solid #7b3345;border-bottom:1px solid black;text-align:center;font-size:12px;font-weight:bold;cursor:move;line-height:29px;color:white;}
    .clientshop { width: 590px; height: 613px; }
    .kekse { font-weight:bold;margin-top:-20px; font-size:15px; }
    .shopline { cursor: default; font-size: 12px; background: #203640; color: white; padding: 15px; border: 2px solid #3E6575; }
    .clientBar { padding: 7px 5px;background:url('<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/top.png"; ?>') repeat scroll 0 0 transparent;border-bottom:1px solid #33352D; text-shadow: 1px 1px 1px black; border-radius: 4px;height:31px;width:100%;z-index:1;}
    .cursor { transition:opacity 1s; }
    .cursor:hover { cursor: pointer; opacity: 0.7; }
    #onlineUsers { float:left;margin-top: 8px;margin-left:10px;font-weight: bold; text-shadow: 1px 1px 0px grey; }
    </style>
    </head>
    <body style="overflow: hidden; cursor: auto;width: 100%; position: fixed;" id="client" class="flashclient">
    <div id="window_overlay"></div>
    <div class="hotelalert" id="hotelalert_1" onMouseDown="refreshDialog(1);">
    <div id="close" onClick="hideDialog(1);"></div>
    <div class="h_blue">Spiele</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="eeevents"></div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_2" onMouseDown="refreshDialog(2);">
    <div id="close" onClick="hideDialog(2);"></div>
    <div class="h_orange">Top 5</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="top_users">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_3" onMouseDown="refreshDialog(3);">
    <div id="close" onClick="hideDialog(3);"></div>
    <div class="h_pink">Beziehungs-System</div>
    <div style="height: 365px">
    <div style="padding:0 10px;" class="couple_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_4" onMouseDown="refreshDialog(4);">
    <div id="close" onClick="hideDialog(4);"></div>
    <div class="h_red">YouTube Playlists</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="yt_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_5" onMouseDown="refreshDialog(5);">
    <div id="close" onClick="hideDialog(5);"></div>
    <div class="h_red playlist_title">-/- Playlist</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="playlist_load">

    </div>
    </div>
    </div>
    <div class="hotelalert" id="hotelalert_6" onMouseDown="refreshDialog(6);">
    <div id="close" onClick="hideDialog(6);"></div>
    <div class="h_green">Meine Playlist - Verwalten</div>
    <div style="overflow-y: scroll; height: 365px">
    <div style="padding: 10px;" class="playlist_config">

    </div>
    </div>
    </div>
    <div class="hotelalert clientshop" id="hotelalert_7" onMouseDown="refreshDialog(7);">
    <div id="close" onClick="hideDialog(7);"></div>
    <div class="h_blue">Client Shop</div>
    <div class="shopline">
    <div class="left" style="margin-top:11px;">
    <img src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_1.png"; ?>" />
    </div>
    <div class="left" style="margin-left:10px;">
    <b style="font-size:15px;">Willkommen im <?php echo cmsSettings("site_name"); ?> Katalog!</b><br />
    Was immer dir bei <?php echo cmsSettings("site_name"); ?> am besten gef&auml;llt.
    </div>
    <div class="right">
    <span class="kekse"></span> <img src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/iconbig_kekse.png"; ?>" />
    </div>
    <div class="clear"></div>
    </div>
    <div style="padding: 10px 0 10px 10px;" class="clientShop">

    </div>
    </div>
    <div class="hotelalert" style="height: 500px;width:420px;" id="hotelalert_10" onMouseDown="refreshDialog(10);">
    <div id="close" onClick="hideDialog(10);"></div>
    <div class="h_blue" id="botTitle">Bot bearbeiten</div>
    <div>
    <div style="padding: 10px;" class="editBotPnl">

    </div>
    </div>
    </div>
    <div class="clientBar" id="clientBar" style="display:none;">
    <div class="left">
    <img class="cursor" onClick="showDialog(1, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_events.png"; ?>" />
    <img class="cursor" onClick="showDialog(2, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/top_icon.png"; ?>" />
    <img class="cursor" onClick="showDialog(3, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_liebe.png"; ?>" />
    <img class="cursor" onClick="showDialog(4, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_youtube.png"; ?>" />
    <img class="cursor" onClick="showDialog(7, 0);" src="<?php echo cmsSettings("site_url")."templates/".cmsSettings("site_template")."/img/client/icon_client_shop.png"; ?>" />
    </div>
    <div id="onlineUsers">
    <?php echo getServerStatus("users_online"); ?> Mitglieder online
    </div>
    <div class="clear"></div>
    </div>

    <div id="windows"></div>
    <div id="overlay"></div>
    <div id="client-ui" style="height: 94.1%">
    <div id="flash-wrapper">
    <div id="flash-container">
    <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none">
    <div class="cbb clearfix">
    <h2 class="title">Bitte besorg dir die neueste Adobe Flash Player Version.</h2>
    <div class="box-content">
    <p>Hier kannst Du den Adobe Flashplayer herunterladen und installieren: <a href="http://get.adobe.com/flashplayer/">Install flash player</a>. Mehr Informationen und Anweisungen zur Installation sind hier zu finden: <a href="http://www.adobe.com/products/flash…o/instructions/">Mehr Informationen</a></p>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/63_1d…lash_player.gif" alt="Get Adobe Flash player"/></a></p>
    </div>
    </div>
    </div>
    <noscript>
    <div style="width: 400px; margin: 20px auto 0 auto; text-align: center">
    <p>Wenn du nicht automatisch weitergeleitet wirst <a href="/client/nojs">klick hier</a></p>
    </div>
    </noscript>
    </div>
    </div>
    </div>
    <div id="content" class="client-content"></div>
    </body></html>

    Config Emulator:

    Spoiler anzeigen


    ## uberEmulator System Configuration File
    ## Must be edited for the server to work

    ## MySQL Configuration
    db.hostname=localhost
    db.port=3306
    db.username=root
    db.password=PASS
    db.name=silver

    ## MySQL pooling setup (controls amount of connections)
    db.pool.minsize=10
    db.pool.maxsize=500

    ## Game TCP/IP Configuration
    game.tcp.bindip=[IP]
    game.tcp.port=30000
    game.tcp.conlimit=11000
    game.tcp.conperip=100
    game.tcp.enablenagles=true

    ## MUS TCP/IP Configuration
    mus.tcp.bindip=[IP]
    mus.tcp.port=30001
    mus.tcp.allowedaddr=127.0.0.1

    ## Client configuration
    client.ping.enabled=1
    client.ping.interval=20000
    client.maxrequests=300

    food.url=http://[IP]/game/gamecenter/gamecenter_basejump/
    food.ip=[IP]
    food.port=30005


    rs4.php

    Spoiler anzeigen

    <?php
    /*
    * Class by Burak, original banner by capostrike93
    **/
    Class Banner{
    var $width;
    var $height;
    var $pixels;
    var $token;
    var $prime;
    var $generator;
    public function __construct(){
    $this->width = 100;
    $this->height = 114;
    }
    public function LoadPixels($filename){
    $this->pixels = file_get_contents($filename);
    }
    public function SetToken($token){
    $this->token = $token;
    }
    public function LoadDHfromServer($host, $port){
    if(filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)){
    $host = gethostbyname($host);
    }

    $fp = fsockopen($host, $port, $errno, $errstr, 1);

    if (!is_resource($fp)) return false;

    $packet = 'GET'.chr(1).$this->token;

    fwrite($fp, $packet);
    fflush($fp);
    stream_set_timeout($fp, 1);

    $data = fgets($fp, 512);
    list($this->prime, $this->generator) = explode(':', $data);

    fclose($fp);
    }
    public function LoadDHfromStatic($prime, $generator){
    $this->prime = $prime;
    $this->generator = $generator;
    }
    public function Calculate(){
    $insert = chr(strlen($this->prime)).$this->prime.chr(strlen($this->generator)).$this->generator;

    $Length = strlen($this->token);
    $Length2 = strlen($insert);
    $p = 0;
    $bitsnum = "";

    for($i=0;$i<$Length2;$i++){
    $bits = base_convert(ord($insert[$i]) ^ ord($this->token[$p]),10,2);
    $need = 8 - strlen($bits);
    for($o=0;$o<$need;$o++)$bits = "0".$bits;
    $bitsnum .= $bits;
    if (++$p == $Length) $p = 0;
    }

    $insertpos = 0;
    $Length = strlen($bitsnum);
    for ($y = 39; $y < 69; $y++)
    {
    $a = 0;
    for ($r = 4; $r < 84; $r++)
    {
    $pos = (($y + $a) * $this->width + $r) * 4;
    $b = 1;
    while ($b < 4)
    {
    if($insertpos < $Length)
    {
    $binaryData = base_convert(ord($this->pixels[$pos + $b]),10,2);
    $need = 8 - strlen($binaryData);
    for($o=0;$o<$need;$o++) $binaryData = "0".$binaryData;
    $binaryData[7] = $bitsnum[$insertpos];
    $this->pixels[$pos + $b] = chr(base_convert($binaryData,2,10));
    $insertpos++;$b++;
    continue;
    }
    break 3;
    }
    if ($r % 2 == 0) $a++;
    }
    }
    }
    public function Build(){
    $img=imagecreatetruecolor($this->width, $this->height);
    imagealphablending($img, false);
    imagesavealpha($img, true);
    $x=0;
    $y=0;
    $colors=unpack("N*", $this->pixels);
    foreach($colors as $color)
    {
    imagesetpixel($img, $x, $y, (0x7f-($color>>25)<<24)|($color&0xffffff));
    if(++$x==$this->width)
    {$x=0;$y++;}
    }
    header('Content-Type: image/png');
    imagepng($img);
    }
    }

    $banner = new Banner;
    $banner->LoadPixels('banner.txt');

    if(isset($_GET['token']) && strlen($_GET['token']) == 40){
    $banner->SetToken(trim($_GET['token']));
    //$banner->LoadDHfromServer("127.0.0.1", 300);
    $banner->LoadDHfromStatic("114670925920269957593299136150366957983142588366300079186349531", "1589935137502239924254699078669119674538324391752663931735947");
    $banner->Calculate();
    }

    $banner->Build();
    ?>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!