Get IP addresses of connected clients

Just starting out? Need help? Post your questions and find answers here.
BrendanE
User
User
Posts: 63
Joined: Tue Nov 11, 2003 2:04 pm
Location: Derbyshire, England

Get IP addresses of connected clients

Post by BrendanE »

Is there a way to get the IP of a connected client using the client ID using PB's networking functions?
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

There's no PB native way, if that's what you want but you can use API to get the ip from a client id. Search for "GetPeerName" and you'll find how to use API to obtain ip address of a client...
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: Get IP addresses of connected clients

Post by NoahPhense »

BrendanE wrote:Is there a way to get the IP of a connected client using the client ID using PB's networking functions?
This works great.

viewtopic.php?t=7197

- np
BrendanE
User
User
Posts: 63
Joined: Tue Nov 11, 2003 2:04 pm
Location: Derbyshire, England

Post by BrendanE »

Thanks fellas, works a treat!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

That link looks nice, but do you have one that actually returns an ip address instead of a random string of numbers?
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

I've used that code before and it works just fine. :)

You may need to reinstall or something???
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

I searched that yesterday, but nobody answer me... may be because of my english but in CodeArchiv, in the directory "CodeArchiv\Internet&Co\InternetConnect\", there a code called "GetRemoteIP.pb" which is interesting. You can get the local IP, and the remote IP.
I will create a library, and I'll include this function.

Is my english so bad????? :?:
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
Post Reply