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