summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoehm2014-11-10 13:30:42 +0100
committermoehm2014-11-10 13:30:42 +0100
commit39cda24064c04488b2e1b07e37683c79eae67d28 (patch)
tree91f61b79da3877f1fd26960f74c7d156b197ce8d
parent72a3cc39d5e629562be36758173afc99efb62af3 (diff)
downloadhttpheader-39cda24064c04488b2e1b07e37683c79eae67d28.tar.gz
request url via get
-rw-r--r--index.php32
1 files changed, 30 insertions, 2 deletions
diff --git a/index.php b/index.php
index 20aca4b..dbbe210 100644
--- a/index.php
+++ b/index.php
@@ -1,3 +1,10 @@
+<?php
+
+if ( isset($_REQUEST['url']) && $_REQUEST['url'] != "" )
+ $set = true;
+else
+ $set = false;
+?>
<!doctype html>
<html>
<head>
@@ -58,7 +65,11 @@ a {
text-decoration: underline;
}
</style>
- <title>Check HTTP Headers online!</title>
+ <?php if ( $set) ?>
+ <title>Check HTTP Headers online!</title>
+ <?php else
+ echo '<title>Header: ' . htmlentities($_POST['url']); .'</title>';
+ ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>
</head>
@@ -73,10 +84,24 @@ a {
<div class="container">
<div class="text-center">
<div class="row">
+<?php
+if ( $set ){
+?>
+ <h3><u><?php echo htmlentities($_REQUEST['url']); ?></u></h3>
+ <br>
+ <pre>
+<?php
+ require 'getheader.php';
+ echo htmlentities($header);
+?>
+ </pre>
<h3>Retrieve HTTP Headers Online!</h3>
<p>Check the response headers for websites. <br> Enter a URL and hit the submit button.</p>
<br>
-<form class="form-horizontal" action="/header" method="POST">
+<?php
+} else {
+?>
+<form class="form-horizontal">
<fieldset>
<legend></legend>
@@ -101,6 +126,9 @@ a {
</fieldset>
</form>
+<?php
+}
+?>
</div>
</div>
</div>