33 行
1.1 KiB
PHP
33 行
1.1 KiB
PHP
<?php
|
||
// パラメートルがなければ、スキップ。
|
||
if (null !== $_GET['url'] && $_GET['url'] != '') {
|
||
$data = file_get_contents('links.json');
|
||
|
||
foreach (json_decode($data) as $k => $v) {
|
||
// jsonファイルでキーを見つければ、転送されます。なければ、404エラーが出ます。
|
||
if ($_GET['url'] == $k) {
|
||
header('Location: '.$v);
|
||
exit;
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
|
||
<head>
|
||
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
|
||
<title>076エラー - 未検出</title>
|
||
<style>
|
||
body { background-color: #232629; color: #fcfcfc; }
|
||
a { color: #ea81e8; text-decoration: none; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div style="text-align: center;">
|
||
<h1>【404】未検出</h1>
|
||
<hr />
|
||
<p>匿名自営業076のウェブサイト又はサービスです。<br /><a href="https://www.076.moe">https://www.076.moe</a></p>
|
||
</div>
|
||
</body>
|
||
</html>
|