From b3286eb015079950554508e0724fd5f12c71833f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 24 May 2023 21:18:39 -0500 Subject: add geolocation functionality --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 39f6c48..e1231b3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -ifconfig.php -============ +# ifconfig.php **Simple PHP script to show IP address, UserAgent and other info** @@ -27,3 +26,26 @@ With this code in the .htaccess file there is no need to type out the full URL, Instead, you can just open 'ifconfig/xml' to get XML output or 'ifconfig/ua' to determine useragent. Run `curl -L -X GET https://ip.cleberg.net/\?q\=text` in Linux terminal to get some info. + +## Development + +First, install PHP and Composer. For Fedora, run: + +```bash +sudo dnf install php-cli composer +``` + +If applicable, install or update the maxmind-db dependency: + +```bash +composer require maxmind-db/reader:~1.0 + +# to update, run: +composer update +``` + +Next, you can launch a dev server to test any of your changes: + +```bash +sudo php --server localhost:8080 --docroot . +``` -- cgit v1.2.3-70-g09d2