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'
ly slow so I'm going to have to use both this and
the "check for extension" function together. Still, I can worry a lot
less about getting my index weighted down by binary files. The code is
pretty basic at this point, but here it is:
// Check for binaries
$ckbin = 14;
racter above standard ascii, I just have to look for them.
AIM> If one is there, then just get rid of it. It's true that an OS can't
AIM> tell the difference between a jpg and an exe file, but that's to be
AIM> expected. But the file_get_contents() function DOES open the fi
Yes, and in fact that is what I am doing now. This is a spider bot
though, so I'm having to think of every single type of binary file that
could be linked to on the web. So far I'm up to 28 with no end in sight.
What about a .com file? I can't omit links that end in .com can I?
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's only good for most cases. PHP is r
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 t
I want to store whois requests including the ip address and date/time
stamp into a file or MySQL database (a database is what I prefer to use)
for monitoring the PHP whois script. Anybody an idea of how I could do
this? I'm a beginner in PHP so any help is welcome.
--IS
--
PHP General Ma
he database.");
//exit();
}
$ip = $REMOTE_ADDR;
$insert="INSERT INTO $table (name,ipaddress) VALUES ('$name','$ip')";
$db_query=mysql_db_query($db_name,$insert);
if($name) {
if($dbquery) { print("Done."); } ELSE { print("Didn't
8 matches
Mail list logo