php - Get Client Ip in Symfony2 -


i have searched, cannot seem find answer simple question:

how force symfony give me ipv4 version of user's ip, or missing ?

can both ipv4 , ipv6 ?

thanks

edit: question different, because not trying ip, know of function getclientip ( that's why in title ), want function return ipv4 , ipv6 version of ip. ( or function, way both, ipv4 , ipv6 )

edit2: how ip right now:

public function getuserip() {     return $this->request->getclientip(); } 

and returns ipv6 exclusively. ( function ran inside of own usermanager, checks , updates current user on every call, plugging event controller enter part symfony pipeline )

if user connected ipv6 there no ipv4 address display , vice versa. 1 version of ip.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -