Search found 2 matches

by matt86
Sat Aug 20, 2011 1:17 pm
Forum: PHP - Code
Topic: detect binary file's mime type
Replies: 3
Views: 3537

Re: detect binary file's mime type

Sorry Christopher,
But i must know first the mime type and after save the image with file_put_contents.
The finfo function want the path of image.

I must detect the binary file's mime type first.
by matt86
Sat Aug 20, 2011 12:39 pm
Forum: PHP - Code
Topic: detect binary file's mime type
Replies: 3
Views: 3537

detect binary file's mime type

Hi guys, I have a question, how can detect a binary file's mime type? I am creating a system API that allows the client to upload files within my server via API calls. The client must send the image into binary like this: function ImgToBinary($pathImg) { $con = file_get_contents($pathImg); $en = bas...