Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2002
    Location
    Chicago
    Posts
    375

    Echoing Flash with PHP

    This whole thread is in refrence to this previous one:
    http://www.webhostingtalk.com/showth...hreadid=386575

    I took that code, modified it so that it'll show flash, but now I have a sizing issue with that embeded flash. What I want it to do is display something like 400H X 750W but I can't get it. I've tried tossing the height and width tags in, but no dice, I get an error when I try to execute it. If anyone could steer me in the right direction, I'd appreciate it.

    For Reference:
    PHP Code:

        <?php

    $iname 
    $_GET['i'];

    echo 
    "<embed src='$iname' />";

    ?>
    And the url:
    http://hostedbyhex.com/josh/new/mbed.php?i=How.swf
    -DPI
    Chicago's #1 Datacenter Technician

  2. #2
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342

    Talking

    PHP Code:
    <?php

    echo '><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="400">
            <param name="movie" value="'
    .$iname.'">
            <param name="quality" value="high">
            <embed src="'
    .$iname.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"  width="750" height="400"></embed></object>';
    ?>
    should work fine

    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  3. #3
    Join Date
    Jul 2004
    Posts
    868
    also dont forget to change width & height if they are difference

  4. #4
    Join Date
    Jun 2004
    Location
    Bay Area -USA
    Posts
    1,738
    And as a security thing you may want to make sure that nobody can type in

    filename.php?i=../../../index.php or something like that and download your code.

    I dont think it would be a large issue in this case but for others who have similar things.
    <<< Please see Forum Guidelines for signature setup. >>>

  5. #5
    Join Date
    Dec 2002
    Location
    Chicago
    Posts
    375
    Thanks for the help, however that still doesn't work. I replaced my include with that, and I get the same error I did when I tried to set the size earlier. I donno what to do now.
    -DPI
    Chicago's #1 Datacenter Technician

  6. #6
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    something is wrong on your thinigi...

    resolution would be to not use the width/height on the flash, but insert it into an iframe which does..

    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •