Jump to content

Recommended Posts

Posted

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";
    }
 

  • 3 weeks later...
Posted

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

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


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock