The Lurker's Guide to Babylon 5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

episodes.php 1.0KB

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