Linked Questions

Popular Questions

i have create a methord for get user ip address and i use this

this is my view

def get_ip(request):
    x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
    if x_forwarded_for:
        ip = x_forwarded_for.split(',')[0]
    else:
        ip = request.META.get('REMOTE_ADDR')
    return HttpResponse(ip) 

this is my side http://hp30405.pythonanywhere.com/myip/

it gives me my ip 47.247.238.18

but my real ip is

2405:204:e68c:5415:3599:9ec7:c5c:3f40

how i got this real ip please tell me

and if i use this link in diffrent device then it give same ip in diffrent device it givas ip 47.247.238.18 in all device

Related Questions