I have done a simple web page in php to test post request from telnet. Here is the code of the web page (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 the 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 it doesn't work....any help?
curl http://localhost/example.php -d 'Name=myname'