Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 11:37 -0500, Robert P. J. Day wrote: > On Mon, 8 Mar 2010, Ashley Sheridan wrote: > > > What about writing the first n bytes to a file and then passing that > > to the command line? I'm assuming a Linux server here, but it should > > do the trick. > >gah! i was hop

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
On Mon, 8 Mar 2010, Ashley Sheridan wrote: > What about writing the first n bytes to a file and then passing that > to the command line? I'm assuming a Linux server here, but it should > do the trick. gah! i was hoping for something that wouldn't make me want to gouge out my eyes with a s

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 11:33 -0500, Robert P. J. Day wrote: > On Mon, 8 Mar 2010, Ashley Sheridan wrote: > > > On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: > > > > > hi, i'm interested in the most comprehensive way to determine the > > > content type of a stream of bytes that's been

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
On Mon, 8 Mar 2010, Ashley Sheridan wrote: > On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: > > > hi, i'm interested in the most comprehensive way to determine the > > content type of a stream of bytes that's been uploaded to a PHP > > script? assuming that the bytes are uploaded simp

Re: [PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Ashley Sheridan
On Mon, 2010-03-08 at 10:57 -0500, Robert P. J. Day wrote: > hi, i'm interested in the most comprehensive way to determine the > content type of a stream of bytes that's been uploaded to a PHP > script? assuming that the bytes are uploaded simply via a POST > parameter, i can see that there are a

[PHP] best way to determine (MIME) content type of a stream of bytes?

2010-03-08 Thread Robert P. J. Day
hi, i'm interested in the most comprehensive way to determine the content type of a stream of bytes that's been uploaded to a PHP script? assuming that the bytes are uploaded simply via a POST parameter, i can see that there are a couple ways to do it: * getimagesize() * FileInfo i've bee