How can I get both IPv4 and IPv6 address using PHP code?

前端 未结 2 1949
再見小時候
再見小時候 2021-01-14 11:13

I have a script which sends a request to another server but problem is that IPv6 does not supported so if I send IPv6 then give error so i need thi

2条回答
  •  一个人的身影
    2021-01-14 12:02

    You can't.

    Only the IP address the request came from is available.

    There's no reliable way to identify other IP addresses (my laptop currently has 12 IP addresses) that route to the same computer.

提交回复
热议问题