DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading a Delphi record file from PHP?

 
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming
View previous topic :: View next topic  
Author Message
ristuart
Member


Joined: 30 Aug 2003
Posts: 4

PostPosted: 30/08/03 08:57    Post subject: Reading a Delphi record file from PHP? Reply with quote

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 Smile
Back to top
View user's profile
Johnny_Bit
Moderator


Joined: 15 Jun 2003
Posts: 142

PostPosted: 30/08/03 18:12    Post subject: Reply with quote

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
View user's profile
ristuart
Member


Joined: 30 Aug 2003
Posts: 4

PostPosted: 01/09/03 07:49    Post subject: Reply with quote

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
View user's profile
Johnny_Bit
Moderator


Joined: 15 Jun 2003
Posts: 142

PostPosted: 01/09/03 15:07    Post subject: Reply with quote

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
View user's profile
richardchaven
Member


Joined: 30 May 2003
Posts: 20

PostPosted: 02/09/03 21:57    Post subject: Reply with quote

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
View user's profile Send e-mail Yahoo Messenger
ristuart
Member


Joined: 30 Aug 2003
Posts: 4

PostPosted: 12/01/04 17:32    Post subject: I feel a bit impolite... Reply with quote

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
View user's profile
Johnny_Bit
Moderator


Joined: 15 Jun 2003
Posts: 142

PostPosted: 12/01/04 20:22    Post subject: Reply with quote

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
View user's profile
ristuart
Member


Joined: 30 Aug 2003
Posts: 4

PostPosted: 12/01/04 21:32    Post subject: Not a central web-based interface Reply with quote

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. Smile
Back to top
View user's profile
Display posts from previous:   
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group