Skip to content

swegio/ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Watchers Stars Commits Last Commit GitHub Issues

Simple IP Address Reporting

<?php echo $_SERVER["REMOTE_ADDR"]."\n"; ?>

Pre-requisites

  • Webserver:
    • PHP
    • cURL
  • Client:
    • cURL

Getting started

  • Clone or download the repository into your local directory of choice

  • Upload the file index.php to your webserver

or if you prefer to use your terminal emulator of choice:

$ echo "<?php echo \$_SERVER[\"REMOTE_ADDR\"].\"\\n\"; ?>" >> index.php

  • Open up your console, type curl then replace 'yourserver.com' with the location of your index.php to render the page and display your IP address:
foo@bar:~$ curl yourserver.com
8.8.8.8

Depending on your webserver configuration you may be required to include "/index.php" like:

foo@bar:~$ curl yourserver.com/index.php
8.8.8.8

About

Simple Remote IP Address display tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages