images[0])) {
$impurely = 'https://cn.bing.com' . $str->images[0]->url;
} else {
$impurely = false;
}
if ($impurely) {
global $contents;
if ($contents['url'] !== $impurely) {
global $filename;
$data = array(
"time" => date("Ymd"),
"url" => $impurely
);
$data = json_encode($data);
file_put_contents($filename, $data);
}
Header("Location: " . $impurely);
exit();
} else {
exit('error');
}
}
?>