Converting C++ to PHP (Small job) for some cash.

Discussion in 'Jobs And Career Discussion' started by peec, Jan 4, 2010.

  1. peec

    peec New Member

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi all , i am troubling to convert a C++ script to PHP. (Not quite convert, but implement a way to read the data of a dbc file and return the rows as array..

    This C++ script reads a so called World of warcraft *.dbc file and output its as CSV format. I don't want this, i want it to output it as an array so I can work with the array.

    Im getting pretty desperate.. But i have no clue when working with streams, hex, bits and bytes in a file.

    I will transfer $20 PayPal to the one who do it as a thank you.



    What i want the PHP script's function to do:

    - Open the DBC file.
    - Get the header data and an array of rows wich contains the collumns of data.
    - Maybe a PHP function like this:
    PHP:
       $data dbctoarray($dbcfile);
    or more preferable a class.
     
  2. peec

    peec New Member

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Example of one DBC FILE: svn.mcride.org/mangosphplib/dev/ZoneMusic.dbc
    The C++ Script: svn.mcride.org/mangosphplib/dev/dbc2csv.cpp

    More info about these dbc files the PHP script must be able to read:
    sourcepeek.com/wiki/Category:World_of_Warcraft_DBC_Files
     
  3. peec

    peec New Member

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    For information; I got this far:
    :P Outputting WDBC wich apperently is correct, but the rest is ... hard for me.

    PHP:
    $handle = @fopen("ZoneMusic.dbc""r");
    if (
    $handle) {
        echo 
    fread($handle4);

        
    fclose($handle);
    }
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Moved to Freelance Marketplace.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice