-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, first version of readme and ip.php
- Loading branch information
Boris Behrens
committed
Jan 29, 2017
0 parents
commit 6fb1b0e
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Content | ||
#### ip.behrens.io | ||
This is a little helper script written in PHP. Just put it on a webserver and call it. It will give you your current IP address (IPv4 and IPv6) and the corresponding reverse DNS. | ||
##### Options | ||
``` ?ptr=false | ||
Disables reverse DNS lookup | ||
###### ToDo List | ||
* give possibilities for different outputs | ||
* implement in ruby and python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
$ip = $_SERVER["REMOTE_ADDR"]; | ||
echo "IP Adresse: $ip\n"; | ||
if ($_GET["ptr"] != "false") { | ||
$host = gethostbyaddr($ip); | ||
echo "Hostname: $host\n"; | ||
} | ||
?> |