how do i collect ip address of browser to validate him

Recommended Answers

All 3 Replies

be more specific

Somethin along this line:

# get the IP address of the machine the program is running on

import socket

print socket.getaddrinfo(socket.gethostname(), None)[0][4][0]

OP wants to collect IP address of browser. So guess he may be using CGI. here's an example

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.