Nandini Posted September 7, 2008 Share Posted September 7, 2008 Hi friends I dont know this is the correct place to post this type of question. But i want to solution. I am doing my personal website. I that i am providing send greetings, online tutorials and entertainment and etc. Till now tutorials and send greetings are completed. But for entertainment i want to play songs. For playing songs i am using following script. Its working properly working in I.E. But in mozilla and netscape its not working. means browser asking install missing plugins. When i click that button it displays as "no plugins available". Without install plugins i can't play music file in my browser using php. So can any one tell me howc can i install plugins. Send me plugins url's if any. my script: <embed src="myfile.mp3" autostart="true" loop="true" width="2" height="0"> </embed> <noembed> <bgsound src="myfile.mp3" loop="infinite"> </noembed> Thanx in advance Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/ Share on other sites More sharing options...
DarkWater Posted September 7, 2008 Share Posted September 7, 2008 1) This has nothing to do with PHP. 2) That's not a script, it's just HTML markup. 3) Infinite mp3's just piss off users because if they have their own music playing, it just messes around with it. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636067 Share on other sites More sharing options...
seany123 Posted September 7, 2008 Share Posted September 7, 2008 if you implement BBcode into your script then you can add .swf files into your script. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636070 Share on other sites More sharing options...
Nandini Posted September 7, 2008 Author Share Posted September 7, 2008 Then how can i play songs using php Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636072 Share on other sites More sharing options...
dezkit Posted September 7, 2008 Share Posted September 7, 2008 <?php echo " <embed src=\"myfile.mp3\" autostart=\"true\" loop=\"true\" width=\"2\" height=\"0\"> "; echo " </embed> "; echo " <noembed> "; echo " <bgsound src=\"myfile.mp3\" loop=\"infinite\"> "; echo " </noembed> "; ?> wat Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636073 Share on other sites More sharing options...
aximbigfan Posted September 7, 2008 Share Posted September 7, 2008 <?php echo " <embed src=\"myfile.mp3\" autostart=\"true\" loop=\"true\" width=\"2\" height=\"0\"> "; echo " </embed> "; echo " <noembed> "; echo " <bgsound src=\"myfile.mp3\" loop=\"infinite\"> "; echo " </noembed> "; ?> wat Yep. PHP can't play music. It is a serverside scripting lang. With some obscure plugin, it may be able to output sound on CLI applications, but otherwise, no. Chris Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636187 Share on other sites More sharing options...
Nandini Posted September 8, 2008 Author Share Posted September 8, 2008 That means we con't play music by using php. Then how can i play music in my websit. Is there any other way. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636302 Share on other sites More sharing options...
php1 Posted September 8, 2008 Share Posted September 8, 2008 i'm not sure whether i understand your problem correctly but to play music you can use: <a href> <a href="myfile.mp3">PLAY</a> hope it hepls! Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636371 Share on other sites More sharing options...
JasonLewis Posted September 8, 2008 Share Posted September 8, 2008 Flash. But why would you want to. I mean, it's terrible. It's up there with bad things like marquees. I hate the background music on websites. If you need the music on there then maybe offer it as a download. Only other thing I can suggest is feeding it into a dynamic flash mp3 player, which you should be able to get free if you google it. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636373 Share on other sites More sharing options...
Nandini Posted September 8, 2008 Author Share Posted September 8, 2008 Hi ProjectFear thanx for ur reply This is not for background music of website. the design is, i have to put some songs links to listen for users. if user click on it, the popup box will open and playing that song. Its just like jukebox(radio). This is what i want. Is there any possibility to do this using php. Thanq Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636389 Share on other sites More sharing options...
Mchl Posted September 8, 2008 Share Posted September 8, 2008 You've to use client-side scripting for this. Either Flash or JavaScript Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636397 Share on other sites More sharing options...
aschk Posted September 8, 2008 Share Posted September 8, 2008 I'll give you a single word answer which will clarify it for you... "no" PHP cannot facilitate what you are looking for on it's own. You WILL require a client side player to stream the music to the persons pc. This will most probably be in Flash. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636400 Share on other sites More sharing options...
aschk Posted September 8, 2008 Share Posted September 8, 2008 If you just provide the link for the song (e.g. <a href="mysong.mp3">my song</a>) when the person clicks on it they will be presented with a download box (as you would expect for more exes/apps) where they can choose to "open" or "save" the file. Assuming that the person in question has mp3 software, usually their player will play the music if they choose "open". This, however, is NOT facilitated by PHP, and i suspect is not what you want either... Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636406 Share on other sites More sharing options...
Nandini Posted September 8, 2008 Author Share Posted September 8, 2008 Ok friends Thanx for all of ur co-operation. I will try it on flash. Link to comment https://forums.phpfreaks.com/topic/123158-solved-play-music-using-php/#findComment-636407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.