I'm trying to load an swf file and dynamically determine its height and width. Is there something anyone knows about that can read the dimensions of the swf file using PHP?
Here's what worked for anyone who needs it:
$aInfo = getimagesize($sFile);
list($iWidth, $iHeight) = $aInfo;
use getimagesize
example:
php -r "print_r(getimagesize('http://adsatt.espn.go.com/ad/sponsors/ibm/Oct_2010/ibm0-728x90-0160.swf'));"
Array ( [0] => 728 [1] => 90 [2] => 13 [3] => width="728" height="90" [mime] => application/x-shockwave-flash )
PS: module gd
is required
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With