Php Codes
Algorithms
Authentication
Calendar
Code Snippets
Content Manage
Cookies
Databases
Date Time
E-Mail
File
Forms
Graphics
HTML and PHP
Look and Feel
MySQL
Searching
Navigation
Statistics
Strings
User Manage
Php > Code Snippets sample source codes
Displays the type of image
Displays the type of image <?php if($img = @GetImageSize("ihcomputing1.gif")) { switch ($img[2]) { case 1 : echo "image is a gif"; break; case 2 : echo "image is a jpeg"; break; case 3 : echo "image type is PNG"; break; case 4 : echo "image type is SWF"; break; case 5 : echo "image type is PSD"; break; case 6 : echo "image type is BMP"; break; } } else { echo "image does not exist"; } ?>
Privacy Policy
|
Link to Us
|
Links