Jump to content
  • 0

Putting Server Highest Peak


Reducto

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

Anyone here knows how to put it on a website? I'm not using FluxCP just a simple CSS/PHP Website.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

BUMP!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

OnPcLoginEvent:
if(getusers(1) > $onlinerecord) {
   set $onlinerecord,getusers(1);
}

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query("SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = '$onlinerecord' LIMIT 1");
$res= mysql_fetch_row($res);

echo 'Record online:'. $res;
?>

The rest is up to you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

Thanks a lot. All I need is to create a table right?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

All you need is to echo the $res in the website, and configure the :

mysql_connect('ip', 'user', 'password');

mysql_select_db('ragnarok_database');

AND

put that npc script in the server.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

I'm having errors. Can you help me?

Notice: Undefined variable: onlinerecord in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 4
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5
Record online:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

Ops.. Try this code.

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `str` = \'$onlinerecord\' LIMIT 1');
$res = mysql_fetch_row($res);

echo 'Record online:'. $res;
?>

Edited by Tribbiani
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

One more error...

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5

Record online:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

One more error...

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\EscapedRO\indexbackup.php on line 5

Record online:

kinda rusty here.. anyways..

use this... it was varname not str ><.

<?php
mysql_connect('ip', 'user', 'password');
mysql_select_db('ragnarok_database');
$res = mysql_query('SELECT `value` FROM `mapreg` WHERE `index` = 0 AND `varname` = \'$RecordOnline\' LIMIT 1');
$res = mysql_fetch_row($res);

echo 'Record online:'. $res[0];
?>

Edited by Tribbiani
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

Thank you very much! It's working now! :)

Link to comment
Share on other sites

×
×
  • Create New...