You set the wrong locale. Right now you set it to ISRO's (18), which is why you see Ratio and Country. Change it to the correct locale (22) and it should display correctly.
Array ( [0] => [1] => Warning: fsockopen() has been disabled for security reasons in /users/srstats/www/ServerStats.php on line 59 [2] => Error [3] => A connection could not be established: [: ] )
Array ( [0] => Error [1] => A connection could not be established. )
I fix that?
HOW I FIX THAT PLÝZZ??
Making your text won't make anyone answer it faster. We can read text like THIS just normally. The error is probably a wrong configured server/config file.
Making your text won't make anyone answer it faster. We can read text like THIS just normally. The error is probably a wrong configured server/config file.
Array ( [0] => Error [1] => The version packet was rejected because a manual patch is needed. [2] =>
[3] => )
/*
* Connect to the Joymax server
*/
function connect()
{
$this->socket = @socket_create( AF_INET, SOCK_STREAM, 0 );
if( $this->socket === false )
{
throw new Exception('Could not create the socket');
return;
}
if( !$this->Send( $this->socket, $packet_payload ) )
return;
}
else // Error, can be version, GatewayServer being down, etc...
{
print( "Error" . PHP_EOL . "<br />" . PHP_EOL );
$res = unpack_uint8( $this->big_data );
if( $res == 4 )
{
print( "The version packet was rejected because the GatewayServer is closed." . PHP_EOL . "<br />" . PHP_EOL );
}
else if( $res == 2 )
{
print( "The version packet was rejected because it is outdated." . PHP_EOL . "<br />" . PHP_EOL );
break;
}
else if( $res == 1 )
{
print( "The version packet was rejected because the version is too new." . PHP_EOL . "<br />" . PHP_EOL );
}
else if( $res == 5 )
{
print( "The version packet was rejected because the version is too old." . PHP_EOL . "<br />" . PHP_EOL );
}
else if( $res == 6 )
{
print( "The version packet was rejected because a manual patch is needed." . PHP_EOL . "<br />" . PHP_EOL );
}
else
{
print( "The version packet was rejected (Code: $res)." . PHP_EOL . "<br />" . PHP_EOL );
}
Short and sweet: this project allows you to have native server stats via PHP without having to use an external program to collect the server stats.
In other words, everyone should be able to host their own server stats on their site as long as they have a capable web server. I've tested locally and on a remote host, so it should be fine with most modern hosts. Unfortunately, as tricky as this code was to write, there is nothing that can be done if your server does not support all the components.
This is a bare minimal release, so you will need some web designing skills to make it look "pretty" or additional php/database skills to enhance it more.
readme.txt
Just a helpful hint: if you wonder how to "loop" updates, take a look into CRON jobs (your web host must support them!). If not, you will have to come up with another solution (such as using a program that always runs to force the refresh).
Also, using these concepts, you can use this code for other games and projects in a similar fashion! PHP is quite capable afterall.
Enjoy!
Troubleshooting:
Make a test page with the following code:
Code:
<?php
phpinfo();
?>
Upload the page, run the script, and save the results. Delete the page afterwards.
Q. Why do I see an empty page when I try to use the server stats?
A. This usually means a needed php component is not there. Check for the following strings in "Configure Command": '--enable-sockets', '--with-mcrypt=', and '--enable-bcmath'.
Look for each section in the configuration. It should look something like the following.
BCMath:
mcrypt:
sockets:
Q. Can more/less debugging information be provided for PHP errors?
A. In short, no. It all depends on how PHP is configured and most hosts are really restrictive to changes made to PHP. Unless you are running your own server where you can reconfigure PHP!
Q. What do the different errors mean?
A. Most errors should be self descriptive. Try to search the text in the php files to see what they are associated with.
Q. I get a bunch of MCRYPT warnings when trying to run the stats?
A. Please see .
More Q/A will be added as they arise.
Very nice good job
but the MCRYPT has a discontinued feature in the newest PHP Versions
Silkroad Security API 06/09/2011 - SRO Coding Corner - 5 Replies i was trying to run the server_stats example but it just immediately closeed and i cant figure out why..
also i think i need ti configure the ip or port? where can i do this?
edit: I've found the error.. Index was Outside the bounds of the array line 33
the code:
[HELP]silkroad security 05/09/2011 - SRO Coding Corner - 6 Replies what it silkroad security???
what is the packet analyzing???
Silkroad New security? 01/24/2010 - Silkroad Online - 68 Replies This must be a joke or something another wanna be Game Guard? cus silkroad added a new folder called hackshield to the game directory... lol anyone have any inputs on this? maybe for once they trying to do something lol kinda funny... :rtfm:
[Tips] Silkroad Account Security 08/24/2009 - SRO Guides & Templates - 12 Replies Hey,
I know there are some threads about this out there but I think this will be useful though.
Your password should contain at least 7 letters and/or numbers. Hint: Come up with some really senseless sentence with letters and numbers. Here an example : I look forward to the Simpsos Halloween Special on October 31th., Now take the first letter of every word and your password is: “ilfttshsoo31” For a password like this a bruter needs about 107 years and you can remember it easily.
...
Silkroad Security Video 11/06/2008 - SRO Hacks, Bots, Cheats & Exploits - 10 Replies Hi guys,
i just played a bit with Silkroad and c++.
The result was a Undetected Silkroad Keylogger.
I was Scanning it for fun on Virustotal.com
the result was 1/36
The 1 Antivir who said anythink
was Panda - Suspicous File
Maybe you have the Question now
why did you post this here?