diff options
| -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> |
