[PHP] World of Tanks xml reader

Results 1 to 7 of 7
  1. #1
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,767Posts

    [PHP] World of Tanks xml reader

    He,

    For the people who dont know what World of Tanks is, it's a online tank game. Where you can battle with other people's tanks and win.

    I'm currently trying to make a private server for WoT (World of Tanks) and that's why I made the XML reader.

    The xml's of WoT are encoded and not readable for the eye which makes it hard to edit.

    This php code can generate a nice xml where you can edit it, after you're done. You can import the xml and save it to a file.

    Reading file:
    PHP Code:
    $file = new FileSystem('./scripts_config_new.xml');
        
    $wotfile = new WOTXMLFile($file);
        
    $wotps = new WOTPacketSection($wotfile);
        
        
    $xmloutput $wotfile->ExportToXML($wotps'scripts_config')->OutputMemory();
        
        echo 
    htmlspecialchars($xmloutput); 
    Writing file:
    PHP Code:
    $newfile = new FileSystem('./scripts_config_new.xml'true);
        
    $newwotfile = new WOTXMLFile($newfileWOTPacketSection::HEADER);
        
    $newwotps = new WOTPacketSection($newwotfile);
        
    // Arguments: WOTPacketSection, XML, remove roottag
        
    $newwotfile->ImportFromXML($newwotps''true); 

    Source code:*** removed ***
    Encoded xml file:*** removed ***
    Live demo: *** removed ***

    There are some predefined attributes:
    export-type: Needed for importing the xml back so the typecast wont get lost
    export-length: Needed for numeric length (8/16/32 bit) or floats length


    Comments are welcome.
    Last edited by Joopie; 09-06-16 at 08:19 PM.


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

    Re: [PHP] World of Tanks xml reader

    Soon... There will be a WoT section.

  3. #3
    Pee Aitch Pee Dave is offline
    MemberRank
    Mar 2011 Join Date
    The NetherlandsLocation
    722Posts

    Re: [PHP] World of Tanks xml reader

    Not bad, but aren't you supposed to set the content-type to text/xml or application/xml instead of text/html?

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

    Re: [PHP] World of Tanks xml reader

    Quote Originally Posted by Dave View Post
    Not bad, but aren't you supposed to set the content-type to text/xml or application/xml instead of text/html?
    Never thought about that. Ill add it tomorrow. Thanks!

    Verstuurd van mijn HTC Butterfly

  5. #5
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: [PHP] World of Tanks xml reader

    Always wanted a World of Tanks emulator! Glad to see someone is actually working on one.

  6. #6
    Developer iGalaxy is offline
    MemberRank
    Jul 2013 Join Date
    C:/xampp/htdocsLocation
    488Posts

    Re: [PHP] World of Tanks xml reader

    Mmmmm, nice, WoT looks like a good game,

  7. #7
    Novice Pepejson is offline
    MemberRank
    Nov 2013 Join Date
    2Posts

    Re: [PHP] World of Tanks xml reader

    Are you still working on this emu :)? I started working on decrypting packets



Advertisement