So I have a website that you need to log in to and once you are authenticated a cookie is set with a unique session variable (as well as the obligatory db insert with an ip address to say they are logged in) I can use to identify the individual concerned.
I want to be able to identify exactly who is listening to the icecast audio stream.
So I'm using the on-connect process to be able to capture who is requesting to listen, Icecast will pass me ip address, agent as well as a number of other variables. it then updates a table with a flag they are listening and on-disconnect flags the amount of time they listened.
So to summarise:
- Logon
- Log session/ip to DB
- Into Website / App
- Play stream
- OnConnect - add agent and "Streaming" flag (based on ip)
- OnDisconnect - Add time listened (based on agent and ip)
The problem comes that I can have people either listening on multiple devices (tablet/laptops) at the same time (or they switch from one to another within a space of a few minutes) or there are multiple logons at the same ip (behind a firewall for example).
I dont really want to use http based authentication in the traditional sense (ie user:pass@domain.com) as more and more browsers are phasing this out. So what are my options for getting an idea of exactly who is who ?
current scripts are based on php, but am quite happy to play with something else if the need arises.
Aucun commentaire:
Enregistrer un commentaire