Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrive IP address in C?

Status
Not open for further replies.

perlguy

Programmer
May 17, 2001
26
0
0
US
Is there any way to retrieve local PC IP address of user in C prg.?
I would like to track the users on our website, also to block if someone tries to flood messages in the forum.
All I need is to get his IP address when he logs in the forum. Is there any function to retrive IP address of user into C prg.?

Any help would be appreciated. Thans in advance.
perlguy.
 
If you are using a web interface, it's easy. The server sets the environment variable REMOTE_ADDR to the address of the client machine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top