Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Find Retros Vote API Not Working. ArcurusEMU, BrainCMS 1.8.1.

Newbie Spellweaver
Joined
Feb 5, 2018
Messages
12
Reaction score
1
Hi,

I have been trying to set up the Find Retros Vote API on my hotel. I am able to add in the code into the forcevote.php and locate it in the relevant folder. However, once I add in the line of code to the top of the client.php the client stops loading, after this if you go to view the source of the client, through a browser, the majority of the code is none existent.

Any ideas or information is welcome, thanks in advanced.

~PressedPills
 
Newbie Spellweaver
Joined
Feb 5, 2018
Messages
12
Reaction score
1
Hi, this is the code for my client. I have edited out the URL. I was trying to add in the code to reference the vote page at the top of the code before anything else.

Code:
<?php    staffCheck();    Game::sso('client');        Game::homeRoom();?><html> 
<script type="text/javascript">
this.blankwin = function(){
        var dlists = new Array();  
 dlists[0] = 'forum.ragezone.com'; 

    var hostname = window.location.hostname;
    hostname = hostname.replace("www.","").toLowerCase();
    var a = document.getElementsByTagName("a");    
    this.check = function(obj){
        var href = obj.href.toLowerCase();
                var dbopcount = 0;
                if (href.indexOf("http://")!=-1)
                {
                   for (jdi = 0; jdi <= dlists.length; jdi++)
                   {
                      if (href.indexOf(dlists[jdi]) == -1)
                      {
                         //alert("NO MATCH " + dlists[jdi] + " " + href);
                         dbopcount = dbopcount;  //Do nothing
                      }
                      else
                      {
                         //alert("match " + dlists[jdi] + " " + href);
                         dbopcount++;
                      }
                   } 
                   if (dbopcount > 0)
                     return true; //If this link URL was an internal URL
                   else  //there were no matches to any internal domain, so leave it external
                     return false;
                }
                else
                {
                  return false;
                }
        //return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? false : true;                
    };
    this.set = function(obj){
        obj.target = "_self";
    };    
    for (var i=0;i<a.length;i++){
        if(check(a[i])) set(a[i]);
    };        
};

// script initiates on page load. 

this.addEvent = function(obj,type,fn){
    if(obj.attachEvent){
        obj['e'+type+fn] = fn;
        obj[type+fn] = function(){obj['e'+type+fn](window.event );}
        obj.attachEvent('on'+type, obj[type+fn]);
    } else {
        obj.addEventListener(type,fn,false);
    };
};
addEvent(window,"load",blankwin);
</script>
 
<script type="text/javascript">
this.blankwin = function(){
        var dlists = new Array();  
 dlists[0] = 'forum.ragezone.com'; 

    var hostname = window.location.hostname;
    hostname = hostname.replace("www.","").toLowerCase();
    var a = document.getElementsByTagName("a");    
    this.check = function(obj){
        var href = obj.href.toLowerCase();
                var dbopcount = 0;
                if (href.indexOf("http://")!=-1)
                {
                   for (jdi = 0; jdi <= dlists.length; jdi++)
                   {
                      if (href.indexOf(dlists[jdi]) == -1)
                      {
                         //alert("NO MATCH " + dlists[jdi] + " " + href);
                         dbopcount = dbopcount;  //Do nothing
                      }
                      else
                      {
                         //alert("match " + dlists[jdi] + " " + href);
                         dbopcount++;
                      }
                   } 
                   if (dbopcount > 0)
                     return true; //If this link URL was an internal URL
                   else  //there were no matches to any internal domain, so leave it external
                     return false;
                }
                else
                {
                  return false;
                }
        //return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? false : true;                
    };
    this.set = function(obj){
        obj.target = "_self";
    };    
    for (var i=0;i<a.length;i++){
        if(check(a[i])) set(a[i]);
    };        
};

// script initiates on page load. 

this.addEvent = function(obj,type,fn){
    if(obj.attachEvent){
        obj['e'+type+fn] = fn;
        obj[type+fn] = function(){obj['e'+type+fn](window.event );}
        obj.attachEvent('on'+type, obj[type+fn]);
    } else {
        obj.addEventListener(type,fn,false);
    };
};
addEvent(window,"load",blankwin);
</script>
</body><head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <title><?= $config['hotelName'] ?> - Client</title>    <script src="/templates/brain/client/js/jquery-latest.js" type="text/javascript"></script>    <script src="/templates/brain/client/js/jquery-ui.js" type="text/javascript"></script>    <script src="/templates/brain/client/js/flashclient.js"></script>    <script src="/templates/brain/client/js/flash_detect_min.js"></script>        <script src="/templates/brain/client/js/client.js" type="text/javascript"></script>                <style type="text/css">        body{            overflow:hidden;        }        #radio{            position: absolute;        }    </style>    <link rel="stylesheet" href="/templates/brain/client/css/client.css?<?php echo time(); ?>" type="text/css">    <link rel="stylesheet" href = "http://HOTEL.co.uk/templates/brain/style/css/player.css?<?php echo time(); ?>" type="text/css">    </head>        <body style="background-color:black;">    <?php        if($hotel['onlineCounter'] == true)        {        ?>        <script type="text/javascript">            $(document).ready(function(e) {                $.ajaxSetup({                    cache:true                });                setInterval(function() {                    $('#onlinecount').load('/onlinecountclient');                }, 8000);                $( "#onlinecount").click(function() {                    $('#onlinecount').load('/onlinecountclient');                });            });        </script>        <div class="clientOnlineBox">            <div class="clientOnlineBoxTxt" id="onlinecount"><small><b><?= Game::usersOnline() ?></b> <?= $config['hotelName'] ?>'s online</small></div>            <img src="/templates/brain/client/images/onlineiconclient.png" style="width:29px;height:28px;ht; */position: absolute;margin-left: 130px;margin-top: -19px;">        </div>        <?php        }    ?>    <center>                <div id="client-ui">    <div class="client" id="client"></div></div>                <script>            var Client = new SWFObject("<?= $hotel['swfFolderSwf'] ?>", "client", "100%", "100%", "10.0.0");            Client.addVariable("client.allow.cross.domain", "1");             Client.addVariable("client.notify.cross.domain", "0");            Client.addVariable("connection.info.host", "<?= $hotel['emuHost'] ?>");            Client.addVariable("connection.info.port", "<?= $hotel['emuPort'] ?>");            Client.addVariable("site.url", "<?= $config['hotelUrl'] ?>");            Client.addVariable("url.prefix", "<?= $config['hotelUrl'] ?>");             Client.addVariable("client.reload.url", "<?= $config['hotelUrl'] ?>/me");            Client.addVariable("client.fatal.error.url", "<?= $config['hotelUrl'] ?>/me");            Client.addVariable("client.connection.failed.url", "<?= $config['hotelUrl'] ?>/me");            Client.addVariable("external.override.texts.txt", "<?= $hotel['external_Texts_Override'] ?>");             Client.addVariable("external.override.variables.txt", "<?= $hotel['external_Variables_Override'] ?>");                 Client.addVariable("external.variables.txt", "<?= $hotel['external_Variables'] ?>");            Client.addVariable("external.texts.txt", "http://HOTEL.co.uk/swfs/gamedata/external_flash_texts.txt?<?php echo time(); ?>");             Client.addVariable("external.figurepartlist.txt", "<?= $hotel['figuredata'] ?>");             Client.addVariable("flash.dynamic.avatar.download.configuration", "<?= $hotel['figuremap'] ?>");            Client.addVariable("productdata.load.url", "<?= $hotel['productdata'] ?>");             Client.addVariable("furnidata.load.url", "<?= $hotel['furnidata'] ?>");            Client.addVariable("use.sso.ticket", "1");             Client.addVariable("sso.ticket", "<?= User::userData('auth_ticket') ?>");            Client.addVariable("processlog.enabled", "0");            Client.addVariable("client.starting", "<?= $config['hotelName'] ?> is loading...");            Client.addVariable("flash.client.url", "<?= $hotel['swfFolder'] ?>/");             Client.addVariable("flash.client.origin", "popup");            Client.addVariable("ads.domain", "");            Client.addVariable("diamonds.enabled", '<?= $hotel['diamonds.enabled'] ?>');            Client.addParam('base', '<?= $hotel['swfFolder'] ?>/');            Client.addParam('allowScriptAccess', 'always');            Client.addParam('wmode', "opaque");            Client.write('client');            FlashExternalInterface.signoutUrl = "<?= $config['hotelUrl'] ?>/logout";        </script>    </center> 
<script type="text/javascript">
this.blankwin = function(){
        var dlists = new Array();  
 dlists[0] = 'forum.ragezone.com'; 

    var hostname = window.location.hostname;
    hostname = hostname.replace("www.","").toLowerCase();
    var a = document.getElementsByTagName("a");    
    this.check = function(obj){
        var href = obj.href.toLowerCase();
                var dbopcount = 0;
                if (href.indexOf("http://")!=-1)
                {
                   for (jdi = 0; jdi <= dlists.length; jdi++)
                   {
                      if (href.indexOf(dlists[jdi]) == -1)
                      {
                         //alert("NO MATCH " + dlists[jdi] + " " + href);
                         dbopcount = dbopcount;  //Do nothing
                      }
                      else
                      {
                         //alert("match " + dlists[jdi] + " " + href);
                         dbopcount++;
                      }
                   } 
                   if (dbopcount > 0)
                     return true; //If this link URL was an internal URL
                   else  //there were no matches to any internal domain, so leave it external
                     return false;
                }
                else
                {
                  return false;
                }
        //return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? false : true;                
    };
    this.set = function(obj){
        obj.target = "_self";
    };    
    for (var i=0;i<a.length;i++){
        if(check(a[i])) set(a[i]);
    };        
};

// script initiates on page load. 

this.addEvent = function(obj,type,fn){
    if(obj.attachEvent){
        obj['e'+type+fn] = fn;
        obj[type+fn] = function(){obj['e'+type+fn](window.event );}
        obj.attachEvent('on'+type, obj[type+fn]);
    } else {
        obj.addEventListener(type,fn,false);
    };
};
addEvent(window,"load",blankwin);
</script>
 
<script type="text/javascript">
this.blankwin = function(){
        var dlists = new Array();  
 dlists[0] = 'forum.ragezone.com'; 

    var hostname = window.location.hostname;
    hostname = hostname.replace("www.","").toLowerCase();
    var a = document.getElementsByTagName("a");    
    this.check = function(obj){
        var href = obj.href.toLowerCase();
                var dbopcount = 0;
                if (href.indexOf("http://")!=-1)
                {
                   for (jdi = 0; jdi <= dlists.length; jdi++)
                   {
                      if (href.indexOf(dlists[jdi]) == -1)
                      {
                         //alert("NO MATCH " + dlists[jdi] + " " + href);
                         dbopcount = dbopcount;  //Do nothing
                      }
                      else
                      {
                         //alert("match " + dlists[jdi] + " " + href);
                         dbopcount++;
                      }
                   } 
                   if (dbopcount > 0)
                     return true; //If this link URL was an internal URL
                   else  //there were no matches to any internal domain, so leave it external
                     return false;
                }
                else
                {
                  return false;
                }
        //return (href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? false : true;                
    };
    this.set = function(obj){
        obj.target = "_self";
    };    
    for (var i=0;i<a.length;i++){
        if(check(a[i])) set(a[i]);
    };        
};

// script initiates on page load. 

this.addEvent = function(obj,type,fn){
    if(obj.attachEvent){
        obj['e'+type+fn] = fn;
        obj[type+fn] = function(){obj['e'+type+fn](window.event );}
        obj.attachEvent('on'+type, obj[type+fn]);
    } else {
        obj.addEventListener(type,fn,false);
    };
};
addEvent(window,"load",blankwin);
</script>
</body></html></center></div></head><script src = "http://HOTEL.co.uk/templates/brain/style/js/slider.js?<?php echo time(); ?>"></script><script src = "http://HOTEL.couk/templates/brain/style/js/radio.js?<?php echo time(); ?>"></script>

Thanks in advanced!
 
Upvote 0
Banned
Banned
Joined
Aug 25, 2009
Messages
431
Reaction score
190
Use this PHP code.

Change $findRetrosUsername

Code:
$findRetrosUsername = "test";

$findRetrosIP = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR'];

if(file_get_contents("https://findretros.com/validate.php?user={$findRetrosUsername}&ip={$findRetrosIP}") == "3") {
    header("Location: https://findretros.com/rankings/vote/{$findRetrosUsername}");
    exit;
}
 
Upvote 0
Newbie Spellweaver
Joined
Feb 5, 2018
Messages
12
Reaction score
1
Hi,
Sorry for the late reply, been very busy with real life. Given that code a go but getting the same issue, the client turns to a white screen, to which if I go to view-source a lot of the code is now showing. When this happens if I check the actual .php for the client the code is all still showing in tact.
Thank you for the reply!
 
Upvote 0
Banned
Banned
Joined
Aug 25, 2009
Messages
431
Reaction score
190
@PressedPills could you send a copy of the code you're getting in the source? If it has some confidential info feel free to PM it.
 
Upvote 0
Back
Top