Please i need help in writing a code showing online friends on a chatting site

You'll need to be much more specific than that. For starters: what language are you using, and what do you have so far?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.