NameSilo

[Php] Auto sensing a .swf dimensions.

SpaceshipSpaceship
SpaceshipSpaceship
NamecheapNamecheap
Watch

Alex.

Account Closed
Impact
5
how can you auto sense the dims of a flash file using php, if at all?

i thought that on phpbb activity mods, you can import a swf file and it auto senses its dims.

is there a way to do it?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
You can actually use the same function that gets properties of images files to do this:

http://uk2.php.net/getimagesize

The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML <IMG> tag.

So for example:

PHP:
<?php
list($width, $height, $type, $attr) = getimagesize('animation.swf');

// echo $width . ' x ' . $height;
?>


Matt

?>
 
0
•••
edit: Ah, I lose. ^
 
0
•••
thanks for your help!
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back