forked from EverexIO/Ethplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go.php
23 lines (16 loc) · 565 Bytes
/
go.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
ob_clean();
header("HTTP/1.0 200 OK");
$aConfig = require_once dirname(__FILE__) . '/service/config.php';
$sLink = "https://ethplorer.io";
if(isset($_GET["link"]) && strlen($_GET["link"])>0){
$sLink = $_GET["link"];
$fp = @fopen(dirname(__FILE__) . "/service/log/go-links.log", "a+");
if($fp){
$t = date('Y-m-d H:i:s')." - ".$sLink." - ".@getenv("REMOTE_ADDR")." - ".@getenv("HTTP_REFERER"). " - ".@getenv("HTTP_USER_AGENT")."\r\n";
@fwrite($fp, $t);
}
}
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $sLink);
?>