Skip to content

Commit

Permalink
first commit, first version of readme and ip.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Behrens committed Jan 29, 2017
0 parents commit 6fb1b0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
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
8 changes: 8 additions & 0 deletions ip.behrens.io/ip.php
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";
}
?>

0 comments on commit 6fb1b0e

Please sign in to comment.