Jump to content
  • 0

Custom Stats on web site


Fizo

Question

Heyz there i saw a lot of script's Like Online and etc and i dont know the way how can i add one of them to my web

 

i try but nothing work

 

because in Navicat IP was Localhost or i add them wrong in Site

 

if some1 know and have one guide send me link or say how can i make one like top pvp top pk top online and etc thank s!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
//---------CONFIGS---------//
$title="creat by Drogata";  // Page Title Here
$type="1"; //Type 1 
$server="localhost"; // MySQL IP
$user="root"; //MySQL Username
$password="your password heree"; //MySQL Password
$database="your db here"; //MySQL Database
$top="100"; 
//-----END OF CONFIGS-----//



if ($title) {
print("<head><title>$title</title></head>");
}
else {
print("<head><title>No Page Title</title></head>");
}
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

if($type == '1'){
$result = mysql_query("SELECT char_name,pkkills FROM characters where pkkills>0 and accesslevel=0 order by pkkills desc")
or die(mysql_error());
echo "<center><h3>Top $top Pk Players</h3></center><table border=10 align=center><tr> <th>Character</th> <th>Top Kills</th> </tr>";
$sum1=0;
while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$pkkills = $row['pkkills'];
	if ($sum1<$top) {
	echo "<tr><td align=center>$name</td><td align=center>$pkkills</td></tr>";
	$sum1++;
	}
}
}

else {
echo "<center>Please config the variable $type. Make it <b>1</b> for Top Status</center>";
}
?>
    </body>
</html>

 

read this a lil and you can change it for whatever you want.

Link to comment
Share on other sites

  • 0

i mean i want to have the access to do that because the user in navicat is 127.0.0.1 and i cant use them ! if i use local host i want to know how can i change them to use my static ip !

Link to comment
Share on other sites

  • 0

create a new user who can be listen anywhere (%) do you use phpmyadmin?

 

on server machine no on hosting yes ! now i have the error Host '69.61.35.13' is not allowed to connect to this MySQL server :S

Link to comment
Share on other sites

  • 0

well i do that with php my admin but if you don't want to use phpmy admin tell me are you using linux or windows server? create a new user and give rights (%) or change the mysql.conf to 127.0.0.1 to 0.0.0.0 and then you can access to the server.

Link to comment
Share on other sites

  • 0

open port in your router

 

this : (3306)

or using your navicat

 

he is not talking bout that he is talking about users on mysql that aren't allowed to get in cuz the user is only set to localhost, he just ahve to change localhost to % and that will solve his problem :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • 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