echo swf file using php.

Status
Not open for further replies.

oracle

New Member
Messages
430
Reaction score
0
Points
0
Hello frnds,

I want to echo an swf file to the browser screen, just as if i was clicking an swf file directly.

I tried the following:

Code:
<?php  
  $file = "mediaplayer.swf";
  $handle = fopen($file,"rb");
  $ret = fread($handle, filesize($file));
  fclose($handle);
  echo($ret);
?>

but I get the inner content of the file on the browser n not the swf movie.

Can anyone suggest a solution to it.
Edit:
Sorry it proved to be a silly question, solved it myself in a while.

However actual problem is here which I am trying to solve. I hope thr are some java masters over here:

Kindly read my post here abt the actual problem and help me if anyone here can .... plzzzzzzzzzz

http://forum.java.sun.com/thread.jspa?threadID=5258166
 
Last edited:

kotofei

New Member
Messages
11
Reaction score
0
Points
0
Create player.php with get-variable "source".

Code:
<object width="550" height="400">
<param name="movie" value="<?php echo $_GET['source']; ?>">
<embed src="<?php echo $_GET['source']; ?>" width="550" height="400">
</embed>
</object>

Then call link like:
Code:
<a href="player.php?source=game.swf">game</a>
 
Status
Not open for further replies.
Top