Re: php unpack function
| From: | php3 at developersdesk dot com | Date: | Thu, 24 May 2001 06:08:45 +0000 |
| Subject: | Re: php unpack function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54165@lists.php.net to get a copy of this message | ||
Addressed to: Chris Mattmann <chris@terra.jpl.nasa.gov>
php-general@lists.php.net
** Reply to note from Chris Mattmann <chris@terra.jpl.nasa.gov> Wed, 23 May 2001 18:05:27
-0700 (PDT)
>
> Thanks for your help Rick.
>
> The problem I was having was basically as you understood, except for the fact
> that I don't really have access to file at the time that I need to unpack the
> data from it.
>
> The file is stored in terms of Oracle bFile pointers, so basically I have some
> code that does like:
>
> //do query to get bfile pointer
> .......
>
> $bindata = $bfileptr->load();
>
>
> Now I have a string representation of the binary file. At this time is where
> I having the difficulties. I need a way without the use of fseek(since I don't
> have a file, I only have a string representation of it) to select a particular
> subset of the data.
>
> Any advice you have would be greatly appreciated, and thanks for replying to
> my original post.
You should be able to use substr() to get any part of the returned
$bindata you want. Just use the byte position equations from my last
post to determine where in the data you want to return.
I think your dba may be crazy to store that much data that way.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com