forked from sgrimm/lurkers-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
episodes.php
55 lines (51 loc) · 1.03 KB
/
episodes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
$domains = array(
'.euro.net' => 'nl',
'.pr.us' => 'pr',
'.ar' => 'wbtv',
'.at' => 'at',
'.au' => 'au',
'.au' => 'au',
'.be' => 'be',
'.br' => 'wbtv',
'.ca' => 'ca',
'.cl' => 'cl',
'.co' => 'co',
'.cr' => 'cr',
'.cz' => 'cz',
'.de' => 'de',
'.es' => 'es',
'.fi' => 'fi',
'.fr' => 'fr',
'.gb' => 'uk',
'.gr' => 'gr',
'.id' => 'id',
'.ie' => 'uk',
'.il' => 'il',
'.it' => 'it',
'.jo' => 'jo',
'.my' => 'id',
'.nl' => 'nl',
'.no' => 'no',
'.nz' => 'nz',
'.pe' => 'pe',
'.ph' => 'ph',
'.pk' => 'pk',
'.pl' => 'pl',
'.pt' => 'pt',
'.ru' => 'ru',
'.se' => 'se',
'.sg' => 'sg',
'.si' => 'si',
'.uk' => 'uk',
'' => 'us',
);
$remote_host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$server_name = $_SERVER['SERVER_NAME'];
foreach ($domains as $suffix => $cnt) {
if (!$suffix || substr($remote_host, -strlen($suffix)) == $suffix) {
header("Location: http://$server_name/lurk/countries/$cnt/eplist.html");
exit(0);
}
}
print file_get_contents('internal/dom-error.html');