diff options
author | Aaron Ball <nullspoon@iohq.net> | 2016-03-29 21:20:42 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2016-03-29 21:28:43 -0600 |
commit | 237d51c8d87f7952dcf498ec707ebd778b3842ae (patch) | |
tree | 6a85fbdb79fc5bda319a02ace3cc1914bc1ebb66 /info.php | |
parent | b5e85adc44c70adf5f75f175b24251bf2f8ecda0 (diff) | |
download | oper.io-237d51c8d87f7952dcf498ec707ebd778b3842ae.tar.gz oper.io-237d51c8d87f7952dcf498ec707ebd778b3842ae.tar.xz |
Replaced agent.php and ip.php with info.php
Now we can pass a query string to request certain info, and it only
takes one file (eg: info.php?q=agent or q=ip).
Diffstat (limited to 'info.php')
-rwxr-xr-x | info.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/info.php b/info.php new file mode 100755 index 0000000..b49a379 --- /dev/null +++ b/info.php @@ -0,0 +1,10 @@ +<?php +if($_GET['q'] == 'ip') { + echo($_SERVER['REMOTE_ADDR']); +} elseif($_GET['q'] == 'agent') { + echo($_SERVER['HTTP_USER_AGENT']); +} else { + echo("ERROR: Please specify a value for q (ip or agent)."); +} +echo("\n"); +?> |