It is currently Mon, 27 Jun 2022 12:14:05 GMT



 
Author Message
 How to send http request whit shell programming?
I want to use linuxbox to do as server,and try to use the SMS  service
provided by the mobile company via web to get my system health message.You
know ,to use the web to send messages ,I should complete web  authentication
first,which can be done by sending
http://SMSweb/checkuser.php?user=username&passwd=passwd ,and then I can send
messages by sending
http://SMSweb/sendmessages.php?mobile=1546131455487&content=somthing.  I can
do all in ms-ie ,but when I try this in linux by lynx
http://SMSweb/checkuser.php?user=username&passwd=passwd ,it doesn't .and
always ask me  to download the page.I want to check my system and use lynx
to send SMS messages via web by shell programming.I just don't know why it
does't work in lynx . If I can do it without using lynx ?

thanks!!



 Fri, 04 Nov 2005 15:04:14 GMT   
 How to send http request whit shell programming?

Use wget or use Perl's LWP, which provides a script called GET. Both are
probably already installed on your system:

GET -esd http://SMSweb/sendmessages.php?mobile=1546131455487&content=somthing

--
Dave Carrigan
Seattle, WA, USA
d...@rudedog.org | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL



 Fri, 04 Nov 2005 23:54:23 GMT   
 How to send http request whit shell programming?

This may get a bit off topic, but:

You can easily send data with bash; simply write to and read from
"/dev/tcp/$HOST/$PORT", same goes for "/dev/udp/". - You will have to
parse the data, though.

If You only want to send a message to some cell phone, like the new
dynamic IP ore similar, and You can recieve emails via Your cell phone,
just use sendmail, like so (all in one line, or "\"; edit as necessary):

echo -e "To: YourPhon...@YourPhoneCo.com\nSubject: Server on fire\n \
Date: $(date)\nFrom: Sen...@Address.org (Alias Here)\n\n $MESSAGE | \
sendmail -FSend...@Address.Net recipi...@getmessage.info

Mostly, when receiving emails via Your phone, they require You to leave
one of "Subject:" or $MESSAGE blank. - Just check that before. The
command above works well with any email address.

Cheers, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...



 Sat, 05 Nov 2005 02:56:53 GMT   
 How to send http request whit shell programming?
thanks  a lot  ,dave and jack!
"jack" <n...@all.org> ??????:bab9b1$fti$0...@news.t-online.com...


 Sat, 05 Nov 2005 15:49:52 GMT   
 
   [ 4 post ] 

Similar Threads

1. HTTP request sent; waiting for response

2. Sending an HTTP GET request from Unix to IIS under NTLM

3. Connection: close HTTP header sent with every request

4. http protocol: Why does the client send two requests

5. shell script to log http request

6. Issuing http request via bash shell script

7. Make HTTP request from Unix shell script

8. PD Program to send remote requests

9. Apache Proxy server that will transform an HTTP request in a HTTPS request


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software