Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Real Player

Status
Not open for further replies.

bopritchard

Programmer
Jan 27, 2003
199
US
Are there are php functions for handling Real Player files...specifically i would like to embed a real video file into site...
 
Real Player files are media files that are either streamed through a Real Server (or another streaming server) or downloaded. The browser handles the dispatch of the file to the appropriate player.

The easiest way to embed a file in an HTML page is to use the appropriate HTML <object> tags for object embedding.
However, this has nothing to do with PHP.

Theoretically you can open any file that's on the filesystem and send it to a browser if you want to deal with all the server/browser communication.
The HTML embedding of the file is much easier and the server/client will handle all necessary headers and transfers.

You certainly can use PHP to set the parameters within the <object> tag but that really is just printing out some text into an HTML page.

;)
 
why doesn't the following work...as soon as i remove the php and print tags it functions fine...put them back in and the realplayer file will not launch...

<object id=RVOCX classid=CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=268 height=208 >
<?php
print&quot; <param name=SRC value=/realaudio/step1.ram>&quot;;
?>
<param name=CONTROLS value=ImageWindow>
<param name=CONSOLE value=cons>
<embed autostart=true src=/realaudio/step1.ram type=audio/x-pn-realaudio-plugin width=176 height=132 controls=ImageWindow console=cons>
</embed>
<param name=autostart value=true>
</object>
 
Did you ever try to print out the entire block and not just the one parameter?

What do you see in the HTML source when you print the line in PHP? Is it any different than when not generated by PHP?
 
i tried the whole block...one line...one word...all same results...here is the html source...doesn't seem to be recongnizing the script tag

<object id=RVOCX classid=CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=268 height=208 >
<?php
print&quot; <param name=SRC value=/realaudio/step1.ram>&quot;;
?>
<param name=CONTROLS value=ImageWindow>
<param name=CONSOLE value=cons>
<embed autostart=true src=/realaudio/step1.ram type=audio/x-pn-realaudio-plugin width=176 height=132 controls=ImageWindow console=cons>
</embed>
<param name=autostart value=true>
</object>
 
That already helps a bit.
So, we can say that the PHP is not being interpreted.

What's the name of the file that contains the PHP?
What's your PHP version?
Any other blocks of PHP on the page?

In order to give answers sometimes questions are necessary.
 
That's exactly right, it's not processing the PHP code as PHP code.

Is it in an .html file or a .php file? Do you have your webserver setup to parse whichever type of file it is through the php interpretor?

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top