📜  php 获取客户端 ip - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:27.745000             🧑  作者: Mango

代码示例6
$exec = 'ipconfig | findstr /R /C:"IPv4.*"';
exec($exec, $output);
preg_match('/\d+\.\d+\.\d+\.\d+/', $output[0], $matches);
print_r($matches[0]);