This article describes how to use getimagesize in php to obtain the size information of images, flash files, and other files, if you want to parse the swf file header information to obtain the size information of the flash file, it's a little too far. Because the getimagesize function has been built into PHP 4 to do this. Its function is used to determine any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, the size of the XBM or WBMP image file, the size of the returned image, the file type, and a height/width text string that can be used in the IMG mark of a common HTML file. In addition, a url is also supported from PHP 4.0.5. For example:
The code is as follows:
Print_r (getimagesize ('http: // www.google.com.hk/images/srpr/logo4?png '));
The output result is:
The code is as follows:
Array
(
[0] = & gt; 550
[1] => 190.
[2] => 3
[3] => width = "550" height = "190"
[Bits] => 8
[Mime] => image/png
)