diff options
| author | moehm | 2014-11-10 13:30:42 +0100 |
|---|---|---|
| committer | moehm | 2014-11-10 13:30:42 +0100 |
| commit | 39cda24064c04488b2e1b07e37683c79eae67d28 (patch) | |
| tree | 91f61b79da3877f1fd26960f74c7d156b197ce8d | |
| parent | 72a3cc39d5e629562be36758173afc99efb62af3 (diff) | |
| download | httpheader-39cda24064c04488b2e1b07e37683c79eae67d28.tar.gz | |
request url via get
| -rw-r--r-- | index.php | 32 |
1 files changed, 30 insertions, 2 deletions
@@ -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> |
