开发者

How to trace friend's ip address while chating

How do I trace my fri开发者_Python百科ends IP address while chating (in facebook,gmail ) ?

Can we do this in jquery ?

Please let me know your pointers.

Thanks,

-Pravin


No you cannot because your javascript chat application does not communicate directly with your friend's browser. It all goes through the server side chat application (gmail, fb... etc) so you are only communicating with that IP which communicates with all the rest.

Of course the server side chat application could be somehow revealing the chat participants IP addresses but this is highly unlikely in any web based chat application that it's used in production right now.

The easiest way to find out the IP of a chat participant is to make him/her click on link for which you'll be monitoring http traffic. I hope it's for a good reason :)


I do not think it is possible since you both connected to the chatting server and all information go through them and there are no direct link between you and your friend.


You can't from a browser. The chat protocol is implemented on the server side, and your browser doesn't know the IP address of your correspondant.


As others have said, you can't do this directly. The only way around it then is to give your friend a link to a script on your server that then alerts you of the IP address.

Basically, such a script would check the remote address, and then log it somewhere or e-mail it to you. That script might then return an image or redirect somewhere so that the person you sent the link to isn't so aware of what happened.

You should also know that the remote address isn't necessarily the IP of your friend. It could be a proxy server, or something else getting in the way. It's more common than you might think.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜