If you don't mind to use wget
wget --post-data "code=125&username=mzajac " localhost/zad.php
Change code
and username
according to what's expected by zad.php
Pergunta
I have some hard time to post some data to the webserver on specified link. I have a task in what I have to post a code - 125 - with my username specified as my nickname to localhost/zad.php
I tried various things. POST comes from lwp-request and I am trying to use it with no success.
lwp-request post -c 125 -C mzajac localhost/zad.php
EDIT:
Now I done something quite right I think.
lwp-request -m POST -C mzajac localhost
Please enter content (application/x-www-form-urlencoded) to be POSTed:
125
^C
I enter 125 but nothing happens like it is waiting for more. So how can I be sure that 125 was sent?
Solução 2
If you don't mind to use wget
wget --post-data "code=125&username=mzajac " localhost/zad.php
Change code
and username
according to what's expected by zad.php
Outras dicas
Use ^D (UNIX) or ^Z (DOS) to end your arguments.
http://en.wikipedia.org/wiki/End-of-transmission_character
Example:
lwp-request -m POST -C mzajac:password http://localhost/zad.php
Please enter content (application/x-www-form-urlencoded) to be POSTed:
code=125
^D