I am using this to get the IP of the visitor, I jsut wanted to know if I can also could get the hostname of the client :
@app.route('/',methods=['GET'])
def home():
REAL_IP = request.environ.get('HTTP_X_REAL_IP', request.remote_addr)
return render_template('home.html', REAL_IP=REAL_IP)
Note : I want to use python flask and not socket :
socket.gethostbyaddr("IP")
I actually want to know the name of the laptop client not the router or any material if NAT is in place.