Jump to content
Sign in to follow this  
remigas

Help RB Status

Recommended Posts

Hi guys i try to add rb status in website, but when i add all server info i got blank page in website below is the code, maybe i do smth wrong..


 

//Script de Status Raid boss
$db['servidor'] = "000.000.000.000";//Nome do servidor 
$db['usuario_mysql'] = "root";// Usuario do mysql
$db['senha_mysql'] = "pass";//Senha do mysql
$db['banco_de_dados'] = "l2jdb";//Nome d banco de dados
$connect = @mysql_connect($db['servidor'], $db['usuario_mysql'], $db['senha_mysql']);
@mysql_select_db($db['banco_de_dados'], $connect);

if(!$connect)
else
{
$raidspawn = mysql_query("SELECT boss_id,respawn_time FROM grandboss_data where boss_id = 25512 or boss_id = 29001 or boss_id = 29006 or boss_id = 29014 or boss_id = 29019 or boss_id = 29020 or boss_id = 29022 or boss_id = 29028 or boss_id = 29045 or boss_id = 29046 or boss_id = 29047 or boss_id = 29065 order by boss_id desc");
while(list($boss_id,$respawn_time) = mysql_fetch_row($raidspawn))
{
    $raidboss = mysql_query("SELECT name,level FROM npc WHERE id = $boss_id");
    $text = '<font color="#090">is alive</font>';
    $respawn = 'Spawn';
    if($respawn_time > 0)
    {
        $respawntime = @date('r',($respawn_time / 1000));
        $text = '<font color="#FF0000">is dead</font>';
        $respawn = "Respawn time: $respawntime";
    }
 

Share this post


Link to post
Share on other sites

a blank page means alot of problems, is the file extension .php?

what php version you use? mysql_connect is deprecated in latest php versions

your code has a problem

if(!$connect)
else

this should be like

if(!$connect){

echo 'problem connecting to database';

}
else

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



×