How to play a flash video file on a website using PHP

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

How to play a flash video file on a website using PHP

Post by dream2rule »

Hello All,

I would want to know how to play a flash video file onto a website using php.
I am completely new to this domain and would appreciate if i get any help on the same.

Thanking You.

Regards,
Dream2rule
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

Look here and example for the introduction of the flash file in page. In php just use

Code: Select all

echo
for the parameters: filename, location, width, height.
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post by dream2rule »

any more suggestions??

i have been given a site wherein i would need to add videos on a regular basis.. i would want to know the player i need to have to play a video and a procedure to play that video.

Regards
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Flash is a client side technology, PHP is a server side technology. PHP can certainly generate HTML that has Flash embedded in it, but PHP as nothing to do with the actual workings of what runs in the browser.
(#10850)
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post by dream2rule »

okay, so can we add any type of video (any format be it wmv, mpeg etc) using PHP?

Regards
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Again you can't use PHP, but can use HTML and Javascript to play video and Flash.
(#10850)
dream2rule
Forum Contributor
Posts: 109
Joined: Wed Jun 13, 2007 5:07 am

Post by dream2rule »

any idea how?? as i am completely new to this and i have not tried it anytime..

Help would be appreciated

Thanks and Regards
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

Use php to output the html code needed to embed the video file in the page like I said in the previous post. That' s what you can do with php.
If you want to play different types of video files I suggest you don' t. The user should download players or codecs just see movies and most will not do this. Transform the video file into flash movie or other format but be consistent.
This is your big problem. PHP doesn' t transform movie formats from one to another. You need a specialist software for this.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Post by Jonah Bron »

Code: Select all

echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave'. '/cabs/flash/swflash.cab#version=7,0,19,0" width="FLASH WIDTH" height="FLASH HEIGHT"><param name="movie" value="FLASH SRC" /><param name="quality" value="high" /><embed src="FLASH SRC" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="FLASH WIDTH" height="FLASH HEIGHT"></embed></object>';
Post Reply