You cannot use the Telnet protocol to implement the HTTP. PuTTY will send some Telnet control sequences that break the HTTP protocol. You need to use a "raw" connection using the
-raw
switch (instead of the-telnet
).You can specify the command on Plink command-line with the SSH protocol only. It does not work with the raw connection or the Telnet. But you can use an input redirection.
This should work:
echo GET /index.php | plink.exe -raw -P 80 servername
Though you better use some more powerful tool. Examples:
PHP: Just download a ZIP archive with Windows build of PHP, extract
php.exe
andphp5ts.dll
and you have a full implementation of HTTP with a full featured scripting language. No installation needed.