<?php
// 图片直链地址数组，可根据需要添加或删除
$imageUrls = array(
    'https://xmfkclgqbqli.ap-southeast-1.clawcloudrun.com/i/2025/7/31/r11fu0.png',
    'https://xmfkclgqbqli.ap-southeast-1.clawcloudrun.com/i/2025/7/31/24.jpg',
    'https://xmfkclgqbqli.ap-southeast-1.clawcloudrun.com/i/2025/7/31/r11vsr.png'
);

// 从数组中随机选择一个图片URL
$randomImage = $imageUrls[array_rand($imageUrls)];

// 获取图片的扩展名，用于设置正确的Content-Type
$pathInfo = pathinfo(parse_url($randomImage, PHP_URL_PATH));
$extension = strtolower($pathInfo['extension']);

// 根据扩展名设置Content-Type
$contentType = 'image/jpeg';
if (in_array($extension, array('png', 'gif', 'webp', 'bmp'))) {
    $contentType = 'image/' . $extension;
}

// 设置响应头
header('Content-Type: ' . $contentType);
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');

// 读取并输出图片内容
readfile($randomImage);
exit;
?>    