From fd90f1dc9ec4f63a5f68a492edb3b41f9b2b43b5 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 2 Aug 2026 15:29:33 -0500 Subject: convert readme to nfo; relicense to 0bsd --- README.nfo | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.nfo (limited to 'README.nfo') diff --git a/README.nfo b/README.nfo new file mode 100644 index 0000000..54d072e --- /dev/null +++ b/README.nfo @@ -0,0 +1,45 @@ +┌──────────────────────────────────────────────────────────────┐ +│ I F C O N F I G . P H P [ KRZ ] krz.sh │ +└──────────────────────────────────────────────────────────────┘ + +WHAT + php script. shows your ip address, user agent, and related info. + same idea as ifconfig.me and ifconfig.co. + + output as html (default), plain text, xml, or json. single values + on request. + +USE + live at ip.cmc.pub: + - ?q=text all, plain text + - ?q=xml all, xml + - ?q=ip ip only + - ?q=ua user agent only + + curl -L -X GET https://ip.cmc.pub/\?q\=text + + apache rewrite so /ifconfig/xml works without the query string: + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ifconfig$ ifconfig.php [L] + RewriteRule ^ifconfig/(.*)$ /ifconfig.php?q=$1 [L] + +DEVELOP + install php and composer. fedora: + + sudo dnf install php-cli composer + + maxmind-db dependency: + + composer require maxmind-db/reader:~1.0 + composer update + + dev server: + + sudo php --server localhost:8080 --docroot . + +┌──────────────────────────────────────────────────────────────┐ +│ krz.sh │ +└──────────────────────────────────────────────────────────────┘ -- cgit v1.2.3