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!

website flyff

Status
Not open for further replies.
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
My website and my server are online and the website says that my channel 1-1 server is offline



xinc_functions.php
Code:
function getUserOnlineState($channel, $id = 0) {
        global $_CONFIG;
if($id == 0) {
            if ($channel > 0) {
                return '<img src="https://forum.ragezone.com/images/icons/misc/up.png" width="7" alt="" data-toggle="tooltip" data-placement="bottom" title="Online: ' . $_CONFIG['allg_svr_channel'][$channel][0] . ' [1-' . $channel . ']"/>';
            }
              else {
                return '<img src="https://forum.ragezone.com/images/icons/misc/down.png" width="7" alt="" data-toggle="tooltip" data-placement="bottom" title="Offline"/>';
            }
        }
        elseif($id == 1) {
            if ($channel > 0) {
                return '<span class="green">Online</span>';
            }
            else {
                return '<span class="red">Offline</span>';
            }
        }
    }
and
Code:
function checkServerState($port, $ip = '127.0.0.1') {
        if(@fsockopen($ip, $port, $errno, $errstr, 0.15) >= 0.15) {return '<span class="green">Online</span>';}
         else {return '<span class="red">Offline</span>';}
    }
    function zeilenumbruch($totalElements, $elementsPerRow) {
        if($totalElements / $elementsPerRow == round($totalElements / $elementsPerRow)) {
            echo '<br />';
        }
    }
xinc_config
Code:
$_CONFIG['allg_svr_channel'] = array(
		1 => array(
			'Channel 1-1',			5400
		),
	);

and AccountServer.ini
Code:
AddTail( -1, 1, "Flyff", "192.168.15.108", 0, 1, 1000 );
AddTail( 1, 1, "Canal 1", "192.168.15.108", 1, 1, 1000 );
 
Last edited:
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
You can do it the lazy way to fix it simply by changing:

Code:
'Channel 1-1',			5400

To
Code:
'Channel 1-1',			80

Granted you have a webserver.
 
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
thank you very much, you are the best, i saw this door until i tried to release it but i didn't think to change it.
 
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
Also want to point out if this is a sapphire based site it will have a few exploits that you really should fix lol.

Make sure you apply this fix: xBlubbs Website Exploit Fix - RaGEZONE - MMO development community

Also in box_loginbox.php:

Change:
Code:
	else {
		$_SERVER['REQUEST_URI'] = str_replace(array('\\', '&logout','?logout'), '', $_SERVER['REQUEST_URI']);
		echo '
<form method="post" name="login" action="' . $_SERVER['REQUEST_URI'] . '">

To:
Code:
	else {
		$_SERVER['REQUEST_URI'] = str_replace(array('\\', '&logout','?logout'), '', htmlspecialchars($_SERVER['REQUEST_URI']));
		echo '
<form method="post" name="login" action="' . htmlspecialchars($_SERVER['REQUEST_URI']) . '">
 
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
sorry for the delay, just a doubt, when i changed the port to 80 of the xinc_config file, now mine if my server is offline, it keeps showing up online on the site.

Thank you very much for the tips on the site, I'll fix
 
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
sorry for the delay, just a doubt, when i changed the port to 80 of the xinc_config file, now mine if my server is offline, it keeps showing up online on the site.

Thank you very much for the tips on the site, I'll fix

Change it to match the cache port in your source or 23000 or 28000.
 
Status
Not open for further replies.
Back
Top