mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Item parser + functions
This commit is contained in:
18
engine/function/itemparser/itemparser.php
Normal file
18
engine/function/itemparser/itemparser.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$items = simplexml_load_file($config['server_path'].'/data/items/items.xml');
|
||||
|
||||
// Create our parsed item list
|
||||
$item_list = fopen('item_list.txt', 'w');
|
||||
|
||||
foreach ($items->children() as $item) {
|
||||
|
||||
if ($item['id'] && $item['name'] != NULL) {
|
||||
|
||||
fwrite($item_list, $item['id'].'@'.$item['name'].PHP_EOL);
|
||||
}
|
||||
}
|
||||
|
||||
fclose($item_list);
|
||||
|
||||
|
Reference in New Issue
Block a user