If it is skype, you can check it by sending an IM. If the small roller disappears after some time, it means the person is online.
See if this http://www.computric.com/2011/07/how-to-find-who-is-invisible-in-gmail-chat-gtalk/ helps you
Thanks, but this is not the exact answer which is I m looking. Let one of your friend is online but in invisible mode and that's why you see as "appear offline" and also your friend does not response against your 'ping' intensionally. Now, my question is - how can you catch you or how can you get confirm that your friend is in online right now and he/she didn't reply intensionally?