$fileContents = file_get_contents('path/to/your/file.txt'); $lines = explode("\n", $fileContents); $randomLine = $lines[rand(0, count($lines) - 1)]; 10.128.0.153|IP10.128.0.153归属地_IP地址查询