summaryrefslogtreecommitdiff
path: root/ifconfig/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'ifconfig/template.php')
-rw-r--r--ifconfig/template.php105
1 files changed, 103 insertions, 2 deletions
diff --git a/ifconfig/template.php b/ifconfig/template.php
index 2271887..50e9b74 100644
--- a/ifconfig/template.php
+++ b/ifconfig/template.php
@@ -17,13 +17,114 @@
<div class="container">
<div class="text-center">
<div class="row">
+ <h1>Ifconfig</h1>
+ <h3>Basic IP API/Look up.</h3>
+ <hr>
+ <?php if( isset($geoip) ){
+ ?>
+
+ <h3 class="text-left"><strong>IP API</strong></h3>
+ <dl class="dl-horizontal">
+ <?php
+ foreach($geoip as $key => $value){
+ echo "<dt>".str_replace('_', ' ', ucfirst($key))."</dt><dd class='text-left'>".$value."</dd>";
+ }
+ ?>
+ </dl>
+ <?php
+ }
+ if ( isset($header) ){
+ ?>
+ <h3 class="text-left"><strong>HTTP Header</strong></h3>
<dl class="dl-horizontal">
<?php
- foreach($result as $key => $value){
- echo " <dt>".$key."</dd><dd>".$value."</dd>";
+ foreach($header as $key => $value){
+ echo "<dt>".$key."</dt><dd class='text-left'>".$value."</dd>";
}
?>
</dl>
+ <?php
+ }
+ ?>
+
+ <form class="form-horizontal">
+ <fieldset>
+
+ <!-- Form Name -->
+ <legend></legend>
+
+ <!-- Text input-->
+ <div class="form-group">
+ <label class="col-md-4 control-label" for="input">IP/Domain</label>
+ <div class="col-md-4">
+ <input id="input" name="ip" placeholder="Look up a host based on IP or FQDN." class="form-control input-md" type="text">
+ <!--span class="help-block text-left">Look up a host based on IP or FQDN.</span-->
+ </div>
+ </div>
+
+
+ <div class="text-left">
+ <div class="form-group">
+ <label class="col-md-4 control-label" for="geoip">Show GeoIP Data</label>
+ <div class="col-md-4">
+ <input id="geoip" name="geoip" value="1" type="checkbox" checked>
+ </div>
+ </div>
+ </div>
+
+ <div class="text-left">
+ <div class="form-group">
+ <label class="col-md-4 control-label" for="requestheader">Show Request Header</label>
+ <div class="col-md-4">
+ <input id="requestheader" name="header" value="1" type="checkbox" checked>
+ </div>
+ </div>
+ </div>
+
+<div class="text-center">
+<!-- Multiple Radios (inline) -->
+<div class="form-group text-left">
+ <label class="col-md-4 control-label" for="output"></label>
+ <!--label class="col-md-4" for="output">Output Format</label-->
+ <div class="col-md-4">
+ <label class="radio-inline" for="output-0">
+ <input name="output" id="output-0" value="html" checked="checked" type="radio">
+ HTML
+ </label>
+ <label class="radio-inline" for="output-1">
+ <input name="output" id="output-1" value="json" type="radio">
+ JSON
+ </label>
+ <label class="radio-inline" for="output-2">
+ <input name="output" id="output-2" value="php" type="radio">
+ PHP (serialized)
+ </label>
+<span class="help-block text-left">Choose output format.</span>
+ </div>
+</div>
+</div>
+
+ <!-- Button -->
+ <div class="form-group">
+ <label class="col-md-4 control-label" for=""></label>
+ <div class="col-md-4">
+ <button id="" name="" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span> Look Up</button>
+ </div>
+ </div>
+
+ <!--input type="hidden" name="output" value="html"-->
+
+ </fieldset>
+ </form>
+ <hr>
+
+ <h4>Command Line Interface: </h4>
+ <!--p class="">Command Line Interface: <code>$ curl http://tools.iamfabulous.de/ifconfig/</code></p-->
+ Get IP: <code>$ curl http://tools.iamfabulous.de/ifconfig/</code> => <?php echo $_SERVER['REMOTE_ADDR']; ?><br>
+ JSON: <code>$ curl http://tools.iamfabulous.de/ifconfig/?output=json</code><br>
+ Get everything: <code>$ curl http://tools.iamfabulous.de/ifconfig/?geoip=1&amp;header=1&amp;output=json</code>
+ <!--p class="">JSON: <code>$ curl http://tools.iamfabulous.de/ifconfig/&amp;geoip=1&amp;header=1&amp;output=json</code></p-->
+
</div>
</div>
</div>