It\'s not always a good idea to rely on $_FILES[][\'type\'] because this is simply the MIME type the client browser has given. This can potentially be faked by a client and browsers can also report the incorrect MIME type or give a generic MIME type.
You can use the getimagesize() function to get the MIME type of an image:
Thanks for posting that bug. The scale_dimensions function wasn\'t working for some combinations of numbers. I\'ve rewritten the function and tested it with every combination of numbers I could think of and it seems to work. If it doesn\'t please let me know.
With it you can do more than just list files, you can also get information about their properties, ownership, permissions, whether or not php can write or read from the file etc.
This is a nice snippet but a a minor change that could improve it a bit. The extension could be treated differently so you can specify no extension and only grab files with no extensions. Would be easy to do like this:
function directoryToArray($directory, $extension = false, $full_path = true) {
if ($extension !== false && strlen($extension)) { $extension = \"\\.$extension\"; }
you should add some switches to the /echo such as: /echo -ti2mbfl. The -t will add a timestamp if timestamping is on, i2 will cause wrapped text to be indented, m will cause the window to be highlighted with the \'message\' colour instead of the event colour and bfl will apply beep, flashing and highlighting options as configured in the mIRC options.
You can use $base to convert from binary to decimal. Example: $base(101,2,10) = 5 (the 101 is the binary number, 2 is the in \'base\', 10 is the out \'base\'. 2 = binary, 10 = decimal, 16 = hexidecimal)