I made a simple web page in php to check the message request from telnet. Here is the webpage code (example.php):
<html>
<body>
<form method="post" action="example.php>">
Your Name:<input type="text" size="12" maxlength="12" name="Name"><br />
<input type="submit" value="submit" name="submit">
</form>
<?php echo $_POST["Name"]; ?>
</body>
</html>
This works from a browser, but I would like to test it from telnet. I tried:
telnet localhost 80
POST example.php HTTP/1.0
Host: localhost
Content-Type: text/html; charset=iso-8859-1
Content-Length: 11
Name=myname
But that will not work ... any help?
source
share