I'm using file_get_contents() to open URLs. Does anyone know if there is
a way to look at the result and determine if the file is binary? I'd
like to be able to block binaries from being processed without having to
try to think of all the possible binary extensions and omit them with a
function
ich
in ways to work with the HTTP protocol, but has no way of detecting
whether it's opening a text file or a binary file. To me this is a
glaring omission. There has to be a way to do it, even if it's a
round-a-bout or backdoor kind of way. Nothing is impossible.
Nick
2004-02-23 at 14:03, Axel IS Main wrote:
Guys, this isn't THAT stupid of a question is it? From my perspective,
the way PHP seems to see it is that I should already know what kind of
file I'm looking at. In most cases that's not an unreasonable
assumption. Unfortunately, that
Thanks, that's very helpful. It beats the heck out of doing it the way
I've been doing it.
Richard Davey wrote:
Hello Axel,
Monday, February 23, 2004, 7:38:25 PM, you wrote:
AIM> Thanks, you just gave me the solution, I think. I don't have to strip
AIM> out every character above standard ascii
That's not bad, but I found a way to do it simply using chr() and
passing it a value. It turns out the if I go 0-31 Almost nothing will
get through. Even the simples html has something in there from that
list. However, by just looking between 14 and 26, one more than carriage
return, and one le
I just upgraded to 4.3.5. I double checked and made sure I put
everything in the right place. If I run php or php-cli from the command
line and the script has phpversion() in it, it returns the correct
string, i.e. 4.3.5. If, however, I pull the same script up in a browser
it gives me 4.3.4. I'
6 matches
Mail list logo