Any furnidata.txt translator? For Phoenix pls. (or any that I can serve)
Sorry in spanish xD
Printable View
Any furnidata.txt translator? For Phoenix pls. (or any that I can serve)
Sorry in spanish xD
do you mean for make a furnidata.xml?
then make a php file with this code:
set the furnidata.txt in the same directory as de php file in htdocs or your root map for web applications (i know my english is bad)PHP Code:<?php set_time_limit(0);error_reporting(0);ob_start();
echo '<?xml version="1.0"?>';echo "\n";?><furnidata><roomitemtypes><?php // creer le produdata$data = file_get_contents("furnidata.txt");$data = utf8_encode($data);$data = str_replace("&", "et", $data);$data = str_replace("<", "", $data);foreach(explode('[',$data) as $premier){ $var = explode('",',$premier); $var = str_replace('"','', $var); $var = str_replace('],','', $var);
if($var[0] == 's') {?><furnitype id="<?php echo $var[1]; ?>" classname="<?php echo $var[2]; ?>"><revision><?php echo $var[3]; ?></revision><defaultdir><?php echo $var[4]; ?></defaultdir><xdim><?php echo $var[5]; ?></xdim><ydim><?php echo $var[6]; ?></ydim><partcolors><?php $colors = explode(',', $var[7]); foreach($colors as $color) { echo '<color>'.$color.'</color>'; } ?></partcolors><name><?php echo $var[8]; ?></name><description><?php echo $var[9]; ?></description><adurl></adurl><offerid>0</offerid><buyout>0</buyout><rentofferid>-1</rentofferid><rentbuyout>0</rentbuyout><customparams><?php if(empty($var[13]) && !isset($var[13])) echo '1'; else echo $var[13]; ?></customparams><specialtype><?php if(empty($var[14]) && !isset($var[14])) echo '1'; else echo $var[14]; ?></specialtype><canstandon>0</canstandon><cansiton>0</cansiton><canlayon>0</canlayon></furnitype><?php } //["s","4227","horse_hairdye_02","45508","0","1","1","","Noisette (crin)","Pour changer la couleur du crin de ton cheval. A usage unique !","","true","-1","-1","15 2,3 50,50","15"],}?></roomitemtypes><wallitemtypes><?php
foreach(explode('[',$data) as $premier){ $var = explode('",',$premier); $var = str_replace('"','', $var);if($var[0] == 'i'){?><furnitype id="<?php echo $var[1]; ?>" classname="<?php echo $var[2]; ?>"><revision><?php echo $var[3]; ?></revision><name><?php echo $var[8]; ?></name><description><?php echo $var[9]; ?></description><adurl></adurl><offerid>0</offerid><buyout>0</buyout><rentofferid>-1</rentofferid><rentbuyout>0</rentbuyout><specialtype>1</specialtype></furnitype><?php }}?></wallitemtypes></furnidata>
<?php
$tampon = ob_get_contents(); ob_end_clean();
$fichier = fopen('./furnidata.xml', 'w+');$resultat = fwrite($fichier, $tampon);fclose($fichier);
// echo $tampon;?>