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