I want to write page, which enables spying activity of another user.
Two users watches the same page, which is very simple (vertical scrollbar, inputs, buttons, checboxes...). Each actions performed by first user on his page is immediately seen for second user. For example, if first user clicks button, then second user watches that click on his own page (pages of both user looks identically). Simply, second user can see everything what the first user is doing (in real time)
Of course, I assume, that I control the code of this webpage.
And my questions:
Is there a simple way to do that, or I have to write handler for each event and send data to second user using Ajax Web Sockets explicitly? Is it possible to intercept the frame of another user without necessity of handle each action?
I wrote basic version of this spying program, which is based on websockets. Each action performed by first user is send to another user.
After receiving a message, program parse data, and invokes appropriate method, so I have the same behaviour on both pages.
It works correct, but using this approach it would be more complicated task if I want to do that without complete the knowledge of page
(In my version users have the same html content, so I can apply these method).
All in all, I am looking for simpler solution (without neccessity of handling each event).
I had browsed about 50 webpages, articles and answers at Stack Overflow by now, but haven't found anything that talks about simpler solution (My friend asked similar question, but there are only few answers). I'm not interested in full solution, I hope that you give me some valuable hints or apparent links. Maybe I didn't enter correct phrase...
Thank you for your help