0

I'm sorry if this is a duplicate question, but I'm confused with something on PHP/JS

I have the code from Chrome desktop notification example, and I am trying to work out how to send the user a notification when <?php sendChat(); ?> is triggered. I have that setup with chat fine, I'm trying to send the offline user a desktop notification when someone chats with them and I have not a clue how to do this. I store their username and IP in my database if it's at all useful.

EDIT: Instead of this, would it be possible to instantly send wherever they are on the site?

Thanks, Phil

Community
  • 1
  • 1
Phil
  • 124
  • 11
  • How can you possibly send anything to anyone that is offline? the IP address is the IP address the last time they were online, which can change - what you are proposing is not only impossible, it's also unpossible – Jaromanda X Dec 08 '16 at 23:16
  • 1
    I may not have made it clear. I mean, the way Facebook notifies you, whenever you receive a new instant message. @JaromandaX – Phil Dec 08 '16 at 23:17
  • you have to be logged in to facebook somehow - so you can't be offline for a start – Jaromanda X Dec 08 '16 at 23:18

0 Answers0