943,753 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5777
  • PHP RSS
Oct 25th, 2006
0

Play song when page load using PHP

Expand Post »
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
Similar Threads
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006
Oct 25th, 2006
0

Re: Play song when page load using PHP

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.
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Oct 26th, 2006
0

Re: Play song when page load using PHP

Click to Expand / Collapse  Quote originally posted by stymiee ...
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)
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Oct 27th, 2006
0

Re: Play song when page load using PHP

Thanks eather
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006
Apr 1st, 2009
0

Re: Play song when page load using PHP

Reputation Points: 10
Solved Threads: 0
Newbie Poster
kathirvelmm is offline Offline
7 posts
since Mar 2008
Apr 1st, 2009
0

Re: Play song when page load using PHP


yes Good example
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: issues with fopen(), fread(),fclose()
Next Thread in PHP Forum Timeline: add days to a date





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC