Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send message from linux terminal to some web server

Tags:

linux

http

post

I am trying to figure out how I can post a message to an http server from the linux shell. What I want is for the shell to post the message and then I can write a small php program to reroute the message to its intended recipient based on the contents and the sender. I cant seem to find a command to do this in Linux. I would really like to stick to a built in utility.

If there is a better frame work that you can think of please let me know.

Thanks

like image 664
Mike Avatar asked May 26 '26 17:05

Mike


1 Answers

The man page for wget has some examples, e.g.

wget --save-cookies cookies.txt \
  --post-data 'user=foo&password=bar' \
   http://server.com/auth.php
like image 52
nos Avatar answered May 30 '26 02:05

nos