Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:15:25+00:00 2026-05-27T18:15:25+00:00

I am new to NodeJS and Socket IO, I use PHP and jQuery. I

  • 0

I am new to NodeJS and Socket IO, I use PHP and jQuery. I want to be able to have a number of different elements of my social network be connected with socket io and send data and such, however I’ve run into the problem of sending certain data to certain users only, and then on top of that, certain kinds of data based on which page is loaded. What sounds like would be a nice way of having this work is attaching different socket IO events or what not to certain divs, so when those divs are loaded, those sockets are being done, and none other. Then I also need a way of keeping track of what users to send the data to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:15:26+00:00Added an answer on May 27, 2026 at 6:15 pm

    …I’ve run into the problem of sending certain data to certain users only, and then on top >>of that, certain kinds of data based on which page is loaded.

    You should try to use socket.io Rooms. This is an example:

    io.sockets.on('connection', function (socket) {
      socket.join('justin bieber fans');
      socket.broadcast.to('justin bieber fans').emit('new fan');
      io.sockets.in('rammstein fans').emit('new non-fan');
    });
    

    You can have a lot of different kind of users and send/receive data depending on the room they joined.

    Then I also need a way of keeping track of what users to send the data to.

    You can use redis to store that kind of information, thats a nice way to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's my first time programming network in java. I want to use it in
What i want to be able to do is have a server which one
I m very new to Node.js and Socket.io. I have built a very basic
I have a few questions regarding using socket IO with PHP and such, I
Suppose I have a list, in which no new nodes are added or deleted.
New to javascript/jquery and having a hard time with using this or $(this) to
I have a multi-language website. I want a module to add multiple version of
I'm new to node.js but I know it has a great socket API called
I'm quite new to Node.js, so please bear with me... Bascially, I have a
I am doing my assignment in Network architecture 1, where I have to implement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.