diff options
| author | root | 2014-11-17 20:10:50 +0100 |
|---|---|---|
| committer | root | 2014-11-17 20:10:50 +0100 |
| commit | 2b24f3ef0e800f878177973eefcb28380a292503 (patch) | |
| tree | 43ec21909460cf947d13a6a5056216c145bd66f9 /ifconfig/template.php | |
| parent | aaef9981946924d5da7b244ee2c5bcd7167f6820 (diff) | |
| download | tools.iamfabulous.de-2b24f3ef0e800f878177973eefcb28380a292503.tar.gz | |
ifconfig stable
Diffstat (limited to 'ifconfig/template.php')
| -rw-r--r-- | ifconfig/template.php | 105 |
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&header=1&output=json</code> + <!--p class="">JSON: <code>$ curl http://tools.iamfabulous.de/ifconfig/&geoip=1&header=1&output=json</code></p--> + </div> </div> </div> |
