rename function names
This commit is contained in:
12
index.php
12
index.php
@@ -24,7 +24,7 @@ if($method === "simple") { // simple
|
|||||||
exit;
|
exit;
|
||||||
} elseif($method === "myself" ) { // detailed info about own IP
|
} elseif($method === "myself" ) { // detailed info about own IP
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
header();
|
print_header();
|
||||||
show_http_headers();
|
show_http_headers();
|
||||||
show_hostname($ip);
|
show_hostname($ip);
|
||||||
show_reverse($hostname);
|
show_reverse($hostname);
|
||||||
@@ -32,14 +32,14 @@ if($method === "simple") { // simple
|
|||||||
show_whois($ip);
|
show_whois($ip);
|
||||||
} elseif($method === "ip" ) { // detailed info an IP
|
} elseif($method === "ip" ) { // detailed info an IP
|
||||||
$ip = $t;
|
$ip = $t;
|
||||||
header();
|
print_header();
|
||||||
show_hostname($ip);
|
show_hostname($ip);
|
||||||
show_reverse($hostname);
|
show_reverse($hostname);
|
||||||
show_ipinfo($ip);
|
show_ipinfo($ip);
|
||||||
show_whois($ip);
|
show_whois($ip);
|
||||||
} elseif($method === "dns" ) { // detailed info a host name
|
} elseif($method === "dns" ) { // detailed info a host name
|
||||||
$hostname = $t;
|
$hostname = $t;
|
||||||
header();
|
print_header();
|
||||||
show_reverse($hostname);
|
show_reverse($hostname);
|
||||||
show_dnsrecords($hostname);
|
show_dnsrecords($hostname);
|
||||||
show_whois($hostname);
|
show_whois($hostname);
|
||||||
@@ -48,7 +48,7 @@ if($method === "simple") { // simple
|
|||||||
header("Location:/".$config->detailed_uri."");
|
header("Location:/".$config->detailed_uri."");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
footer();
|
print_footer();
|
||||||
|
|
||||||
// HTTP HEADERS
|
// HTTP HEADERS
|
||||||
function show_http_headers() {
|
function show_http_headers() {
|
||||||
@@ -155,7 +155,7 @@ function show_dnsrecords($hostname) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// PRINT Header
|
// PRINT Header
|
||||||
function header() {
|
function print_header() {
|
||||||
print '<!DOCTYPE html>
|
print '<!DOCTYPE html>
|
||||||
<html lang="en_US">
|
<html lang="en_US">
|
||||||
<head>
|
<head>
|
||||||
@@ -165,7 +165,7 @@ function header() {
|
|||||||
</head>';
|
</head>';
|
||||||
}
|
}
|
||||||
// PRINT FOOTER
|
// PRINT FOOTER
|
||||||
function footer() {
|
function print_footer() {
|
||||||
global $config;
|
global $config;
|
||||||
echo "<br /><hr /><br />\n";
|
echo "<br /><hr /><br />\n";
|
||||||
echo 'Your plain IP address: <a href="//'.$config->ip4domain.'">IPv4</a> | <a href="//'.$config->ip6domain.'">IPv6</a>';
|
echo 'Your plain IP address: <a href="//'.$config->ip4domain.'">IPv4</a> | <a href="//'.$config->ip6domain.'">IPv6</a>';
|
||||||
|
|||||||
Reference in New Issue
Block a user