Jump to content

Recommended Posts

Hello, im trying to do this with PHP, if their is another way please let me know.

 

Basicly, i want the script to load a flash file based on what id is entered, for example.

 

user enters

 

http://yourdomain.com/index.php?id=456

 

I want it to load the flash file named 456.swf

 

Can anyone help me?

 

This is what i have, im a total n00b to PHP.

 

<?php
$id = $_GET['id'];
$width = "100";
$width = "100";

function flashembed($id, $width, $height) {  
$swfdir = "http://yourdomain.co.uk/scripts/upload";
echo "<tr><td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=$width HEIGHT=$height>
<PARAM NAME=movie VALUE=\"$swfdir/$id.swf\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=menu VALUE=false>
<EMBED src=\"$swfdir/$id.swf\" quality=high WIDTH=$width HEIGHT=$height TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>
</OBJECT></tr></td><br>";
}


echo $id;
?>

Note: I have changed to yourdomain.co.uk for privacy reasons.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/115777-solved-dynamic-flash-content/
Share on other sites

try...

<?php
$id = $_GET['id'];
$width = "100";
$height = "100";

function flashembed($id, $width, $height) {  
$swfdir = "http://yourdomain.co.uk/scripts/upload";
echo <<<_FLASH
<tr><td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH={$width} HEIGHT={$height}>
<PARAM NAME=movie VALUE=\"{$swfdir}/{$id}.swf\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=menu VALUE=false>
<EMBED src=\"{$swfdir}/{$id}.swf\" quality=high WIDTH={$width} HEIGHT={$height} TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>
</OBJECT></tr></td><br>

_FLASH;

}

flashedembed($id,$width,$height);

?>

 

Regards ACE

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.