Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

php code - video

Jan 16, 2008 12:47AM PST

HI all!

I have this piece of code from flashvideo.html:

<object type="application/x-shockwave-flash" width="400" height="300" wmode="transparent"
data="flvplayer.swf?file=<? echo $url; ?>&autoStart=false">
<param name="movie" value="flvplayer.swf?file=<? echo $url; ?>&autoStart=false" />
<param name="wmode" value="transparent" />
</object>

that is called from this other html page, which "creates" a pop up video player:

<a onclick="window.open('video/flashvideo.html?url=08-01-05512K.flv','','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=440,height=365')" href="#">
<img src="images/flash_icon.jpg" width="26" height="25" border="0"></a>

------------------------------------

but I don't want a pop up video player. I want a video player, as when you embed a video from youtube. So I was trying to "match" the 2 pieces of code as I know that one calls the other... I assume that to flashvideo.html I just have to put the url instead of a php snippet calling the file... but I can not do it! I don't know php and I am not quite sure where it ends!

I am sure that for anybody that know a little php it is a silly question...
Whoever can help me I will really apreciate it!

Maguss

Discussion is locked

- Collapse -
php starts with <? and ends with ?>
Feb 11, 2008 4:42AM PST

"echo" means "print" so "echo $url" means print the variable $url. I am supposing you just need to replace <? echo $url ?> with wherever your video is.

As far as embedding the video into your webpage, just search google for some example code and figure it out from that.

- Collapse -
Thanks for the help!
Feb 11, 2008 5:08AM PST

Thanks for the answer... I will give it a try! Thanks again!