Hi i am extreemly new to php, infact never used it before i only need it for an a game client i am making in visualbasic 2005. Here goes: I have all the data in this location: http://tw9ha.tribalwars.net/map/village.txt
it is in this formate(this is just a small portion of the file):
Code:
1,exceptions+village,490,559,1,68,1 2,Morthys+village,514,460,29924,136,2 3,%5B01%5DDevil%27s+Playground,576,473,578787,1848,3 4,%7E+9+ZeTa+ReTiCuLi+%7E,580,515,738520,2598,4 5,bashmasters+village,509,551,790214,1484,5 6,001+%26quot%3BX%26quot%3B,463,491,674672,4429,6 15326,PetShop,571,573,0,128,15326
it is in this formate:
Code:
$id, $name, $x, $y, $tribe, $points, $rank
The x and y are coordinates.
and it says this:
A simple example in PHP to write the villages and their names into a MySQL-database:
Code:
$lines = gzfile('http://ds1.die-staemme.de/map/village.txt.gz', 'r'); if(!is_array($lines)) die("File could not be opened"); foreach($lines as $line) { list($id, $name,$x, $y, $player, $points, $rank) = explode(',', $line); $name = urldecode($name); $name = addslashes($name); mysql_query("INSERT INTO village SET id='$id', name='$name', x='$x', y='$y', player='$player', points='$points', rank='$rank'"); }
How would i go about making a table for this? I need this for Visual basic
astropirit is online now Edit/Delete Message Reply With Quote Quick reply to this message
astropirit
View Public Profile
Find More Posts by astropirit
Add astropirit to Your Buddy List