1. Tired of not being able to see links? Want to chat with other members? Need help?

[R63] Furnidata to Productdata

Discussion in 'Habbo Tutorials' started by MasterJiq, Jan 19, 2017.

  1. MasterJiq

    MasterJiq Member

    Hello!

    I am gonna release my works which can convert furnidata to product data easily.
    I've take 10 minutes to code this actually. lol
    Code:
    <?php
    
    /* Hide all error */
    error_reporting(0);
    
    /* Fetch the furnidata */
    $File = file_get_contents(dirname(__FILE__).'/furnidata.txt');
    
    /* Debug */
    if (!$File)
    {
        die('DEBUG ERROR: Could not find the furnidata. Please put the furnidata in the same of this file.');
    }
    
    /* Explode line by line */
    $Skip = explode("],", $File);
    
    foreach ($Skip as $Part)
    {
        /* It will be repeated if some of furnidata not following the format */
        $Swf = 'horse_hairdye_17';
        $Name = 'horse_hairdye_17 name';
        $Desc = 'horse_hairdye_17 desc';
        /* Explode line by line */
        $Explode = explode('","', $Part);
        /* Check if the furnidata is empty */
        if (!empty($Explode[2]))
        {
            $Swf = $Explode[2];
        }
        if (!empty($Explode[8]))
        {
            $Name = $Explode[8];
        }
        if (!empty($Explode[9]))
        {
            $Desc = $Explode[9];
        }
        /* Printing the productdata */
        print '["'.$Swf.'", "'.$Name.'", "'.$Desc.'"],<br>';
        $Write = '["'.$Swf.'", "'.$Name.'", "'.$Desc.'"],';
        /* Automatically write to product data. Surely it is not working */
        //file_put_contents(dirname(__FILE__).'/productdata.txt', $Write);
        /* Get generated time in seconds line by line */
        //echo '<script>alert("Generated in '.microtime(true).'");</script>';
    }
    ?>
    Name anything to php file such as Generate.php and put furnidata same to directory of this file.

    Thanks!
    --- Double Post Merged, Jan 19, 2017, Original Post Date: Jan 19, 2017 ---
    Or visit here [ Want to see this link? Register ! ]
     

Share This Page

Loading...