Hey Gurus and friends,
I have this app that basically scans for spam and dumps flagged mail to a specified .../tmp directory. When it does this it creates a directory cache file (fixed size record file) to speed up searching for blocked emails. There are about 6 fields and they are all fixed size. So if the first field is only 1 char, it will still be N chars long because the C app writes the fields out to N chars. Now if you simply cat the file to screen you'll see the info, plus a bunch of dashes representing the 0-value bytes.
Now I would like to use this file the way the original application does, but I have no clue how to grab fixed size values from this file.
I've tried fopen("recordfile", "rb"); but it still spits out those dashes.
file("recordfile"); does the same. :queasy:
Is there a way to access this file in PHP and pull the fields out correctly ?
Any help greatly appreciated. If you need more explanation, let me know. RTFMs humbly accepted - but at least gimme a link. 😉