Connection Script

From Newerth: Savage Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:53, 11 January 2008 (edit)
Pancake (Talk | contribs)

← Previous diff
Revision as of 05:55, 11 January 2008 (edit) (undo)
Pancake (Talk | contribs)

Next diff →
Line 6: Line 6:
== Download == == Download ==
You may view the source [http://www.newerth.com/pancake/showproject/serverinfo Here]. SImply Copy-And-Paste the code into a new PHP file. You may view the source [http://www.newerth.com/pancake/showproject/serverinfo Here]. SImply Copy-And-Paste the code into a new PHP file.
 +
 += Configuration =
 +Configuration is very simple. Simply go to the last few lines, and find:
 + //Run the above script, and connect to the server and exchange packets.
 + $server = new serverInfo();
 +
 + //Now, display the returned packet from the server.
 + echo '<pre>';
 + print_r($server->getData('74.86.152.58', 11235));
 + echo '</pre>';
 + ?>

Revision as of 05:55, 11 January 2008

Contents

Savage 2 Server Connection Script

The Savage 2 Connection script connects to a Savage 2 server and gets information about the server. More details will be presented later

Requirements

- PHP5 (Won't work with PHP4, but it can be easily modified to work with PHP4) - Apache

Download

You may view the source Here. SImply Copy-And-Paste the code into a new PHP file.

Configuration

Configuration is very simple. Simply go to the last few lines, and find:

//Run the above script, and connect to the server and exchange packets.
$server = new serverInfo();

//Now, display the returned packet from the server.
echo '
';
 print_r($server->getData('74.86.152.58', 11235));   
 echo '
';
?>