Furnidata & Productdata addons

Results 1 to 9 of 9
  1. #1
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    Furnidata & Productdata addons

    I've coded some nice addons to retros. This is furnidata and productdata checker if furnidata changed on habbo this script updates it. You can use cron jobs with this. :)
    Change links on script!

    Create fdchecker.php file:

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    </head>
    <body>
    <?php
    
    // Check furnidata
    
    // Check Habbo status
    $headers = get_headers('http://www.habbo.fi/home/Habborasia996'); // Change this
    
    if ($headers[0] != "HTTP/1.1 200 OK")
    {
    die("Habbo is in maintenance");
    }
    
    $current = strtoupper(dechex(crc32(file_get_contents("http://localhost/gamedata/furnidata.txt"))));
    $habboviral = strtoupper(dechex(crc32(file_get_contents("http://www.habbo.fi/gamedata/furnidata/1"))));
    
    if ($current != $habboviral)
    {
    echo("Furnidata updated");
    
    file_put_contents("/var/www/gamedata/furnidata.txt", file_get_contents("http://www.habbo.fi/gamedata/furnidata/1")); //  Change it
    }
    else
    {
    // Nothing to do
    }
    ?>
    </body>
    
    </html>
    pdchecker.php:

    Code:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    </head>
    <body>
    <?php
     
    // Check productdata
    
    // Check Habbo status
    $headers = get_headers('http://www.habbo.fi/home/Habborasia996');
    
    if ($headers[0] != "HTTP/1.1 200 OK")
    {
    die("Habbo is on maintenance");
    }
    
    $current = strtoupper(dechex(crc32(file_get_contents("http://localhost/gamedata/productdata.txt"))));
    $habboviral = strtoupper(dechex(crc32(file_get_contents("http://www.habbo.fi/gamedata/productdata/1"))));
    
    if ($current != $habboviral)
    {
    
    echo("Productdata updated");
    
    file_put_contents("/var/www/gamedata/productdata.txt", file_get_contents("http://www.habbo.fi/gamedata/productdata/1"));
    }
    else
    {
    // Nothing to do
    }
    ?>
    </body>
    
    </html>
    ----

    Furnidata & Productdata without cache clear script:

    Code:
    <?php
    
    header("Cache-Control: no-cache");
    header("Content-type: text/plain");
    
    $id = '';
    
    if (isset($_GET['id']))
    {
    	$id = $_GET['id'];
    }
    
    switch ($id)
    {
    	case "furnidata":
    	
    		echo @file_get_contents("http://localhost/gamedata/furnidata.txt");	
    		echo @file_get_contents("http://localhost/gamedata/furnidata_override.txt"); // Remove if you don't need this.	
    		
    		break;
    
    	case "productdata":
    	
    		echo @file_get_contents("http://localhost/gamedata/productdata.txt");	
    		echo @file_get_contents("http://localhost/gamedata/productdata_override.txt"); // Remove if you don't need this.	
    		break;
    }
    
    ?>
    Save this to furniassets.php and change client productdata and furnidata paths to furniassets.php?id=furnidata and furniassets.php?id=productdata.
    When you makes updates on furnidata you not need clear cache :)


  2. #2
    Not so spooky... MrSpooks is offline
    MemberRank
    May 2010 Join Date
    Under a rockLocation
    1,068Posts

    Re: Furnidata & Productdata addons

    Oh this is a pretty nifty tool cheers for the release!,
    maybe you should explain for the noobs how to create a cron job,

    But thanks a great release!

  3. #3
    Still alive. Luminia is offline
    MemberRank
    Apr 2013 Join Date
    Out of SpaceLocation
    1,146Posts

    Re: Furnidata & Productdata addons

    Oh yes! Thank you Matias! That's will be helpfull for someone!

    Many regards, Luminia.

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,610Posts

    Re: Furnidata & Productdata addons

    This does the same trick but in your browser:

    https://chrome.google.com/webstore/d...enbfclihhmmfcd

  5. #5
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,484Posts

    Re: Furnidata & Productdata addons

    Quote Originally Posted by tdid View Post
    This does the same trick but in your browser:

    https://chrome.google.com/webstore/d...enbfclihhmmfcd
    This doesn't require any users to use Chrome or download that, so this release is still better.

  6. #6
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Furnidata & Productdata addons

    Nice release, my dear friend.
    I use a php ripper to automatically rip the furnidata, texts, produdctdata, but that doesnt really check if they have been updated, since i make it run every 2-3 days.

    Oh, i see what this release does, i will be using that and editing for my liking, and putting your credits at the bottom commented out.

  7. #7
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Furnidata & Productdata addons

    Why do you use http://localhost when you can just use the unix path to get the file? Now it does a http request which in theory makes it slower.

    And this.

    PHP Code:
    $habboviral strtoupper(dechex(crc32(file_get_contents("http://www.habbo.fi/gamedata/productdata/1"))));
    ...
    file_put_contents("/var/www/gamedata/productdata.txt"file_get_contents("http://www.habbo.fi/gamedata/productdata/1")); 
    Should be updated to this.. Dont be afraid to use variables to store stuff to avoid multiple the same "read/get" operations.

    PHP Code:
    $habbocontent file_get_contents("http://www.habbo.fi/gamedata/productdata/1");
    $habboviral strtoupper(dechex(crc32($habbocontent)));
    ...
    file_put_contents("/var/www/gamedata/productdata.txt"$habbocontent); 

  8. #8
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Furnidata & Productdata addons

    If any of you need a tutorial on how to make CRONJOBS on a Windows Server / VPS, here is my tutorial
    http://forum.ragezone.com/f335/setup...1/#post7601809

  9. #9
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    Re: Furnidata & Productdata addons

    I like the clothes data stuff. But it ain't professional as some new clothes require .swf files.. So this is a bit useless. But thanks anyway. Maybe somebody could figure something out with this.



Advertisement