Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/09/2010, 08:35
Avatar de vicmx
vicmx
 
Fecha de Ingreso: junio-2008
Ubicación: México
Mensajes: 59
Antigüedad: 15 años, 11 meses
Puntos: 3
Respuesta: Dimensiones de SWF externo

Bueno, no se como tengas el resto de tu código, pero yo lo he probado haciendolo una función, y me ha funcionado perfecto, esto me devuelve el código fuente:

Código HTML:
600324 -  http://blubik.com/locatorswf.swf<div class="bbcode_swf"> <embed src="http://blubik.com/locatorswf.swf" quality="high" type="application/x-shockwave-flash" allownetworking="internal" allowscriptaccess="never" autoplay="false" wmode="transparent" width="600" height="324"></embed></div> 
Y este es mi script:
Código PHP:
Ver original
  1. <?php
  2.  
  3. function video($content){
  4. $max_width = 600;
  5. $max_height = 800;
  6. list($width, $height) = getimagesize($content);
  7. $ratioh = $max_height/$height;
  8. $ratiow = $max_width/$width;
  9. $ratio = min($ratioh, $ratiow);
  10. // New dimensions
  11. $width = intval($ratio*$width);
  12. $height = intval($ratio*$height);
  13.  
  14. return $width . $height . ' -  ' . $content . '<div class="bbcode_swf">
  15. <embed src="' . htmlspecialchars($content) . '" quality="high" type="application/x-shockwave-flash" allownetworking="internal" allowscriptaccess="never" autoplay="false" wmode="transparent" width="' . $width . '" height="' . $height . '"></embed></div>';
  16. }
  17.  
  18. $content = 'http://blubik.com/locatorswf.swf';
  19.  
  20. echo video($content);
  21. ?>

Si te sirve el código tómalo y adaptalo, suerte con ello.