5 Replies - 12830 Views - Last Post: 18 February 2008 - 05:07 AM Rate Topic: -----

#1 NOCKZEE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-August 07

BACKGROUND MUSIC FOR SITE WITH PHP

Posted 17 February 2008 - 05:43 AM

How to give background music for a site using php ?

This post has been edited by NOCKZEE: 17 February 2008 - 09:53 PM

Is This A Good Question/Topic? 0
  • +

Replies To: BACKGROUND MUSIC FOR SITE WITH PHP

#2 dontKnowJava  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 221
  • Joined: 29-September 07

Re: BACKGROUND MUSIC FOR SITE WITH PHP

Posted 17 February 2008 - 10:22 AM

does it have to be in php? a simple <embed> or <bgsound> tags will do the job. i guess you could incorporate php into it. say if you want to play random sounds(which can also be done with js), but youll still probably use html tags to play the sounds.
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: BACKGROUND MUSIC FOR SITE WITH PHP

Posted 17 February 2008 - 10:43 AM

As dontKnowJava pointed out, the easiest way is to use the <EMBED> HTML tag. You could incorporate this into your PHP code if you want by using echo, something like:


echo "<embed src=\"YourFile.wav\"  id=\"YourID\" hidden=\"true\">"



Granted that is a very simplified version of the <EMBED> object, at that link it shows many more attributes you can use.

Hope that helps :)
Was This Post Helpful? 0
  • +
  • -

#4 NOCKZEE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-August 07

Re: BACKGROUND MUSIC FOR SITE WITH PHP

Posted 17 February 2008 - 09:58 PM

Thanks all,
One more question, if I want to put the background music on WP, where should I place the code ? ( on which file? since I see several options : stylesheet, style, header ...... ? or somewhere else? )
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: BACKGROUND MUSIC FOR SITE WITH PHP

Posted 17 February 2008 - 10:10 PM

WP?
Was This Post Helpful? 0
  • +
  • -

#6 NOCKZEE  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-August 07

Re: BACKGROUND MUSIC FOR SITE WITH PHP

Posted 18 February 2008 - 05:07 AM

WP = wordpress
I want to make a site using wp and I want to have a background music
that plays when people open the site. Is it possible?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1