| View previous topic :: View next topic |
| Author |
Message |
ristuart Member
Joined: 30 Aug 2003 Posts: 4
|
Posted: 30/08/03 08:57 Post subject: Reading a Delphi record file from PHP? |
|
|
Hi,
I have an application that is currently able to export data to a Delphi file of records, each with several fields containing strings, integers and a boolean.
Would it be at all possible to have a web-based scripting language such as PHP extract data from these record files?
Thanks for your time,
ristuart  |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 142
|
Posted: 30/08/03 18:12 Post subject: |
|
|
Well of course! Firstly i think to make a sample file with this records in, and to analyze them in hex editor, then a one mistake hit me: what about lillte endian and big-endian?
You know, I don't know PHP i I don't know if there's any Integer to string (in both directions) functions, but only one reasonable thing comes to my head: analyze Ini Files. they got exacly what you newed, but there are preety slow, so.. well i don't knwo |
|
| Back to top |
|
 |
ristuart Member
Joined: 30 Aug 2003 Posts: 4
|
Posted: 01/09/03 07:49 Post subject: |
|
|
I'm afraid that reply lost me... by "analyze ini files" do you just mean think about using INI files instead of the binary record files, or does the analyze mean something I've missed?
The record file does seem well suited to the task the application is doing at the moment.
Thanks,
ristuart |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 142
|
Posted: 01/09/03 15:07 Post subject: |
|
|
| I'm saying that you should try use INI files, 'cause binary record files may cauese weird bug in systems that has diffrent littleendian/bigendian system. |
|
| Back to top |
|
 |
richardchaven Member
Joined: 30 May 2003 Posts: 20
|
Posted: 02/09/03 21:57 Post subject: |
|
|
In what context would, "... a web-based scripting language such as PHP extract data from these record files..." ?
What do you want to do with the data? Create HTML with it?
Cheers |
|
| Back to top |
|
 |
ristuart Member
Joined: 30 Aug 2003 Posts: 4
|
Posted: 12/01/04 17:32 Post subject: I feel a bit impolite... |
|
|
Hello again,
My apologies for not replying before, and also for bringing such an old topic up again. I don't regularly visit this forum, and, although I'd read Johhny Bit's second reply I didn't get another e-mail notification, and haven't checked back here until I happened to find an old link!
The context... well, the script would most likely extract the data from the record file and enter it into a database (e.g. MySQL) for later use. I'm not exactly sure what you mean by the context. The aim was to allow users to have data exported from the program (written in Delphi) and upload it to a web-based interface (ideally written in PHP), where it'd be imported and then used.
Why do you ask? If I've not explained adequately, particularly as I'm not quite sure what you're getting at, would you mind explaining what you meant again?
Thanks for your time,
ristuart |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 142
|
Posted: 12/01/04 20:22 Post subject: |
|
|
| hmm... why don't you try to write this data directly to DataBase? It would be good, and there's no way of supid bigendian\littleendian diffrences. |
|
| Back to top |
|
 |
ristuart Member
Joined: 30 Aug 2003 Posts: 4
|
Posted: 12/01/04 21:32 Post subject: Not a central web-based interface |
|
|
The web-based interface isn't going to be run by myself - it'd be a set of scripts users could optionally run on their own sites if they like, in addition to using the software. I guess I could have users enter info for a database to connect to, and have it done automatically in that way... hmm... this would be worth my considering, thanks. Quite why it hadn't occured to me that this could be more practical before, I don't know.
It's not too important if the bigendian/littleendian problems are going to make reading a Delphi record file from PHP impractical, I was just wondering really. Thanks for your input.  |
|
| Back to top |
|
 |
|