Skip to content

Commit

Permalink
stop trying to get server WAN address
Browse files Browse the repository at this point in the history
  • Loading branch information
Belikhun committed Feb 27, 2020
1 parent 24dae79 commit df5324f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@
require_once $_SERVER["DOCUMENT_ROOT"] ."/data/config.php";
header("Cache-Control: max-age=0, must-revalidate", true);

//? Try to get server WAN address
set_error_handler(null, E_ALL);
$wArr = file_get_contents("http://bot.whatismyipaddress.com", false, null, 0, 36);
restore_error_handler();

define("LAN_ADDR", getHostByName(getHostName()));
define("WAN_ADDR", $wArr);

$loggedIn = false;
$username = null;
Expand Down Expand Up @@ -464,10 +458,6 @@
<t class="left">Mạng cục bộ (LAN):</t>
<t class="right" style="user-select: text;"><?php print LAN_ADDR; ?></t>
</div>
<div class="item lr">
<t class="left">Mạng diện rộng (WAN):</t>
<t class="right" style="user-select: text;"><?php print WAN_ADDR ?: "Không rõ"; ?></t>
</div>

<div class="space"></div>

Expand Down

0 comments on commit df5324f

Please sign in to comment.