Commit ae3335e433

ae3335e433da7c3a97c9a2c421f25a6c9aeafcfd

parent: 4bbf2f1100

Unsigned

cmc <hello@cmc.pub> · 2025-03-11 23:25 UTC

move from cleberg.net to cmc.pub

Layout: unified · split

.!33817!GeoLite2-City.mmdb added
README.md +5 −5
@@ -8,10 +8,10 @@ Available all basic features such as output in HTML, plain text, XML and JSON.
88By default it will be in HTML. Also it is possible to request single values.
99
1010Visit some of the links below to view it in action:
11* [all in plain text](http://ip.cleberg.net?q=text)
12* [all in xml](http://ip.cleberg.net?q=xml)
13* [ip address only](http://ip.cleberg.net?q=ip)
14* [useragent only](http://ip.cleberg.net?q=ua)
11* [all in plain text](http://ip.cmc.pub?q=text)
12* [all in xml](http://ip.cmc.pub?q=xml)
13* [ip address only](http://ip.cmc.pub?q=ip)
14* [useragent only](http://ip.cmc.pub?q=ua)
1515
1616If you're using the Apache web server, you can use the .htaccess rules below to make this site more user friendly:
1717
@@ -25,7 +25,7 @@ If you're using the Apache web server, you can use the .htaccess rules below to
2525With this code in the .htaccess file there is no need to type out the full URL, i.e. 'ifconfig.php?q='.
2626Instead, you can just open 'ifconfig/xml' to get XML output or 'ifconfig/ua' to determine useragent.
2727
28Run `curl -L -X GET https://ip.cleberg.net/\?q\=text` in Linux terminal to get some info.
28Run `curl -L -X GET https://ip.cmc.pub/\?q\=text` in Linux terminal to get some info.
2929
3030## Development
3131
ifconfig.php +7 −7
@@ -14,9 +14,9 @@ function loadGeo(string $ipAddress): ?array
1414}
1515
1616// Set top-level variables for HTML
17$site_title = 'ip.cleberg.net';
17$site_title = 'ip.cmc.pub';
1818$site_owner_name = 'Christian Cleberg';
19$site_owner_url = 'https://cleberg.net';
19$site_owner_url = 'https://cmc.pub';
2020$source_repository = 'https://git.sr.ht/~cmc/ifconfig.php';
2121
2222// Extract geolocation
@@ -116,11 +116,11 @@ elseif (isset($query) && (($query=="text") || ($query=="all"))) {
116116
117117 echo <<<EOD
118118 <pre><code># Curl Commands:
119 curl -L -X GET https://ip.cleberg.net
120 curl -L -X GET https://ip.cleberg.net/\?q\=text
121 curl -L -X GET https://ip.cleberg.net/\?q\=xml
122 curl -L -X GET https://ip.cleberg.net/\?q\=ip
123 curl -L -X GET https://ip.cleberg.net/\?q\=ua
119 curl -L -X GET https://ip.cmc.pub
120 curl -L -X GET https://ip.cmc.pub/\?q\=text
121 curl -L -X GET https://ip.cmc.pub/\?q\=xml
122 curl -L -X GET https://ip.cmc.pub/\?q\=ip
123 curl -L -X GET https://ip.cmc.pub/\?q\=ua
124124 </code></pre>
125125 EOD;
126126