Ok, since there seems to be misinformation and/or confusion on who said what:
The method/way to know if someone is appearing offline, talked about by
andrey and a remark/question about it by
MicroWay, which is:
detecting DP change packets from appearing offline contacts will not work because,
as I said, you will not recieve any DP changes from contacts who are appearing offline since your own Messenger does not request DP updates from contacts who are (appearing) offline.
However, the method/way talked about by
Matty, which is:
changing your own DP and detecting connections from people and comparing them with their statusses will work. This method has also been described a long time ago when 'Open Window Notifiers' discussions popped up and when trying to find a more/better use for them. However, that will also not show you all contacts who are appearing offline though: if you do recieve such a notice you may be certain that the person is appearing offline. If you do not recieve such a notice, you can not be certain; the person could still be apearing offline.