Planetarion Database Dump: Difference between revisions
From Planetarion Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Description == | |||
The '''Planetarion Database Dumps''' are files with ingame information from [[Planetarion]]. | The '''Planetarion Database Dumps''' are files with ingame information from [[Planetarion]]. | ||
They show [[planet]], [[galaxy]] and [[alliance]] information, such as [[score]], [[size]] and [[value]]. | They show [[planet]], [[galaxy]] and [[alliance]] information, such as [[score]], [[size]] and [[value]]. | ||
Line 11: | Line 13: | ||
http://jpaweb01.planetarion.com/botfiles/alliance_listing.txt | http://jpaweb01.planetarion.com/botfiles/alliance_listing.txt | ||
== Tools == | |||
Many alliances write their own tools using these dumpfiles, and sites such as [[sandmans]] and [[pilkara]] also utilize them. | |||
Here are some basic php code examples on how to use em: | |||
<? | |||
mysql_connect( "host", "user", "pass" ); | |||
mysql_select_db( "database" ); | |||
$planetList = file_get_contents( "http://jpaweb01.planetarion.com/botfiles/planet_listing.txt" ); | |||
preg_match_all( "/(\d+)\t(\d+)\t(\d+)\t\"(.+)\"\t\"(.+)\"\t(.+)\t(\d+)\t(\d+)/i", | |||
$planetList, $planetArray, PREG_SET_ORDER ); | |||
mysql_query( "TRUNCATE TABLE planets" ); | |||
foreach ( $planetArray as $planet ) | |||
{ | |||
mysql_query( "INSERT INTO planets VALUES ( $planet[1], $planet[2], | |||
$planet[3], '$planet [4]', '$planets[5]', '$planet[6]', $planet[7], $planet[8] )" ); | |||
} | |||
?> | |||
[[Category:Terminology]] | [[Category:Terminology]] |
Revision as of 03:23, 3 January 2005
Description
The Planetarion Database Dumps are files with ingame information from Planetarion. They show planet, galaxy and alliance information, such as score, size and value.
These dump file(s) are usually used in Arbiter's and the various.
The dumpfiles are available at:
http://jpaweb01.planetarion.com/botfiles/planet_listing.txt
http://jpaweb01.planetarion.com/botfiles/galaxy_listing.txt
http://jpaweb01.planetarion.com/botfiles/alliance_listing.txt
Tools
Many alliances write their own tools using these dumpfiles, and sites such as sandmans and pilkara also utilize them.
Here are some basic php code examples on how to use em:
<? mysql_connect( "host", "user", "pass" ); mysql_select_db( "database" ); $planetList = file_get_contents( "http://jpaweb01.planetarion.com/botfiles/planet_listing.txt" ); preg_match_all( "/(\d+)\t(\d+)\t(\d+)\t\"(.+)\"\t\"(.+)\"\t(.+)\t(\d+)\t(\d+)/i", $planetList, $planetArray, PREG_SET_ORDER ); mysql_query( "TRUNCATE TABLE planets" ); foreach ( $planetArray as $planet ) { mysql_query( "INSERT INTO planets VALUES ( $planet[1], $planet[2], $planet[3], '$planet [4]', '$planets[5]', '$planet[6]', $planet[7], $planet[8] )" ); } ?>