[PHP] Interesting phpversion() thing.

2004-03-30 Thread Axel IS Main
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'

Re: [PHP] Detecting Binaries

2004-02-23 Thread Axel IS Main
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;

Re: [PHP] Detecting Binaries

2004-02-23 Thread Axel IS Main
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

Re: [PHP] Detecting Binaries

2004-02-23 Thread Axel IS Main
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?

Re: [PHP] Detecting Binaries

2004-02-23 Thread Axel IS Main
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

[PHP] Detecting Binaries

2004-02-22 Thread Axel IS Main
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

[PHP] store whois requests

2003-09-16 Thread IS
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

[PHP] Whois request record in database

2003-09-12 Thread IS
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