Hi All,
Could anybody provide code for Text file to .Dat file Conversion in PHP.

Thanks,
Jeba Raj.

    Jeba Raj,

    .DAT is a "Data File" format which can be any of 1000's of possible format's.

    Can you provide an API or Example of what .DAT format you want?

    If you can, try to let us know what program will be READING the .dat file, as I know some MS products use .dat for an RTF / Ritch Text Format file.

      That could be anything. The only bit that's even legible is the bit that might help you find out what format it is. It starts

      /i dataLink Format V01

      .
      Since you're the one who needs to read it, presumably you have some idea what it is. Which means you know more about it than the rest of us.

        I did a google search on a hunch and was right.. that /i dataLink Format V01 specification is for a device which, if I am not mistaken records camera lens information.

        If this is the case, I can not see the purpose in converting any kind of text file to it? I see they have an application which converts the .dat file they produce into a CSV file to be easily human readable.

        If I am mistaken on the purpose of the dataLink format please do mention so.

        jebaraj wrote:

        Thanks for quick reply. if i use decbin() it will convert to 0's and 1's.

        decbin() is a math operation to convert a Decimal (10base) to a binary format, which is 1's or 0's, for your own learning you should read up on this as this is the basis of computers.

        A note, by the way: If I am correct about this i4 dataLink format, you will find a difficult time to have someone write this complex program, the document I found points out the MSB / LSB (Most Significant Bit / Least Significant Bit) and what appears to be Location, etc which is complex and would be in my opinion an extensive project.

        Edit: Forgot to mention, I am not an expert on programming for hardware, but I believe that MSB/LSB Programming is for hardware, and this .dat format explains it is to be saved on a memory card.

        Perhaps you should try to tell us your objective from converting something to this format?

          Write a Reply...