Play song when page load using PHP

Reply

Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Play song when page load using PHP

 
0
  #1
Oct 25th, 2006
hai friends
How to paly song when page laod using php code?
I my php application when i load the home page automatically pale song
Its possible !! ??Please give me any idea

Thanks
vssp
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Play song when page load using PHP

 
0
  #2
Oct 25th, 2006
PHP only works on the server side. That means once it the page is sent to the browser PHP can't affect it anymore. You need to use HTML or JavaScript for this.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 1,073
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 66
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster

Re: Play song when page load using PHP

 
0
  #3
Oct 26th, 2006
Originally Posted by stymiee View Post
PHP only works on the server side. That means once it the page is sent to the browser PHP can't affect it anymore. You need to use HTML or JavaScript for this.
Or you can use flash. Even though I personally go against using flash as a substitute for html/javascript, its the best when it comes to displaying multimedia online. It has the best scripting support for control of the media being played, and also is the most supported (or so they say).

You can use javascript to control media playing in a browser "plugin" such as quicktime or windows media player etc., but it can get quite complicated quite fast if you want to maximize browser support.

If you just want a simple you can just use the HTML tags <bgsound> or <embed>.
This will play a multimedia/sound file with the default supported player on your OS.

eg:

[HTML]<bgsound src="soundfile.wav" autostart="true" loop="false" />[/HTML]

(not hundred percent sure of the syntax of that tag)
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: Play song when page load using PHP

 
0
  #4
Oct 27th, 2006
Thanks eather
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 7
Reputation: kathirvelmm is an unknown quantity at this point 
Solved Threads: 0
kathirvelmm kathirvelmm is offline Offline
Newbie Poster

Re: Play song when page load using PHP

 
0
  #5
Apr 1st, 2009
KathirvelMM
If this helps "Mark it as Solved"
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: Play song when page load using PHP

 
0
  #6
Apr 1st, 2009
Originally Posted by kathirvelmm View Post
<embed> is the right one

<embed src="soundfile.wav" autostart="true" loop="false" />

yes Good example
Thanks
VSSP
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC