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

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.

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:

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

(not hundred percent sure of the syntax of that tag)

Thanks eather

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.