Jump to content

Can PHP play a sound file on windows, localy?


FoxboyJT

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ;)?

Link to comment
Share on other sites

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? ^^;

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.