FoxboyJT Posted October 31, 2007 Share Posted October 31, 2007 I want to have it so, if someone goes to a certain page on my site. (or pushes a button), that it starts blaring a sound on my laptop, is this possible with windows? I'm sorry if this is a noob question, I just don't have much time. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/ Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 you can go with some php solutions found at http://php.net/wrappers.audio or the old html way http://www.computerhope.com/issues/ch000071.htm Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382006 Share on other sites More sharing options...
FoxboyJT Posted October 31, 2007 Author Share Posted October 31, 2007 I'm sorry if I didn't explain well enough, although I do appreciate your help. What I need is for the soun to play on my local computer, when someone else, at a remote location clicks a link, or a button. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382010 Share on other sites More sharing options...
aschk Posted October 31, 2007 Share Posted October 31, 2007 I think what's he after is an "Observer". When someone (Joe Bloggs) uses his site, he wants HIS laptop to play a sound. Do you require this on a per page basis? You'll be most probably looking at logging sessions to a database, and doing an Ajax call with an interval from another page that plays the sound if a new session is added to the db. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382011 Share on other sites More sharing options...
FoxboyJT Posted October 31, 2007 Author Share Posted October 31, 2007 I think what's he after is an "Observer". When someone (Joe Bloggs) uses his site, he wants HIS laptop to play a sound. Do you require this on a per page basis? You'll be most probably looking at logging sessions to a database, and doing an Ajax call with an interval from another page that plays the sound if a new session is added to the db. Ah, kind of like that. I'm setting up something so people can get my attention, if they need me. (On a passworded section of my site. x_x) That was kind of the idea I was looking for, but that sounds about right, I just don't know how to do it, so I would need a point in the right direction. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382014 Share on other sites More sharing options...
aschk Posted October 31, 2007 Share Posted October 31, 2007 Or are you looking at implementing this as another program on your PC (i.e. not a webpage). In that case it's pretty similar. Make a call to the remote database finding the latest sessions and "ding" ing locally. Fairly pointless though... Why do you need this? If you site becomes popular with others it won't be popular with you "ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, .....), LOL What about a view of the sessions on your site, with a concurrent count, time surfing, products bought, that sounds better than a constant sound don't you think ? Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382015 Share on other sites More sharing options...
FoxboyJT Posted October 31, 2007 Author Share Posted October 31, 2007 Or are you looking at implementing this as another program on your PC (i.e. not a webpage). In that case it's pretty similar. Make a call to the remote database finding the latest sessions and "ding" ing locally. Fairly pointless though... Why do you need this? If you site becomes popular with others it won't be popular with you "ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, ding, .....), LOL What about a view of the sessions on your site, with a concurrent count, time surfing, products bought, that sounds better than a constant sound don't you think ? Ehe, yes, well, I do have some more trusted people that I don't get too when I'm busy trying to learn me some C#, so that's what I'm doing this for. If I can make it run another program on my PC, to do it, that's fine too, but I just have no idea how. Could I get a kick in the right direction? ^^; Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382017 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 well not too much a php question but could help in the php code while you'll develop your C# code Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382019 Share on other sites More sharing options...
FoxboyJT Posted October 31, 2007 Author Share Posted October 31, 2007 The thing is, I just need a page so they can make a beep, of some sort, happen on my computer. And I need a kick or point in the right direction to doing it. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382025 Share on other sites More sharing options...
atlanta Posted October 31, 2007 Share Posted October 31, 2007 You will need to looking into C# coding.. which is more of a windows application programming language rather as php is web based so you will probably have to do a combination of both. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382027 Share on other sites More sharing options...
FoxboyJT Posted October 31, 2007 Author Share Posted October 31, 2007 Yes, but C# isn't a good choice, sense I need this to be accessible to others from a web-page. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382028 Share on other sites More sharing options...
ToonMariner Posted October 31, 2007 Share Posted October 31, 2007 There are many ways to skin a cat - but first you must decide is the cat worth skinning? You could use php to exec() a command that would play a sound on your pc or call an app that would do the same thing OR write a script that monitors the access log - (not too frequently mind) and if a new entry exists then play the sound. Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382031 Share on other sites More sharing options...
atlanta Posted October 31, 2007 Share Posted October 31, 2007 Yes, but C# isn't a good choice, sense I need this to be accessible to others from a web-page. Yea i mean have the c# app from your computer read a log or have the php script send data to your pc which would in return trigger the c# app to play a sound Quote Link to comment https://forums.phpfreaks.com/topic/75513-can-php-play-a-sound-file-on-windows-localy/#findComment-382036 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.