[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] wget with sms api help
From: |
Yousong Zhou |
Subject: |
Re: [Bug-wget] wget with sms api help |
Date: |
Wed, 19 Mar 2014 08:39:34 +0800 |
Hi,
On Wednesday, March 19, 2014, <address@hidden> wrote:
> I have an account with smsglobal, they have sms http api as so:
>
> http://www.smsglobal.com/http-api/
>
> If I use a browser like so:
>
>
> http://www.smsglobal.com/http-api.php?action=sendsms&user=myname&password=mypassword&&from=myself&to=targetcellphone&text=Hello%20world
>
> browser says:
>
> OK: 0; Sent queued message ID: e506.....28 SMSGlobalMsgID:64.....80337
>
> and, I receive an sms OK on cellphone
>
> if I try wget with same url, I get[1]:
>
> do I need to escape strings...? how ?
>
> downloaded file has like:
>
> # cat http-api.php?action=sendsms
> ERROR: Missing parameter: user
> ERROR: Missing parameter: password
> ERROR: Missing parameter: from
> ERROR: Missing parameter: to
>
> [1]
> # wget
>
> http://www.smsglobal.com/http-api.php?action=sendsms&user=myname&password=mypassword&&from=mysekf&to=targetcellphone&text=Hello%20world
>
> [1] 18942
> [2] 18943
> [3] 18944
> [4] 18945
> [2] Done user=myname
> [3]- Done password=mypassworde && from=myself
the url needs to be quoted, surrounded by 2 single or double quotes, as
character "&" is for specifying background processes.
> # --2014-03-19 10:56:39--
> http://www.smsglobal.com/http-api.php?action=sendsms
> Resolving www.smsglobal.com... 203.89.193.162
> Connecting to www.smsglobal.com|203.89.193.162|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 130 [text/html]
> Saving to: `http-api.php?action=sendsms.1'
>
> 100%[======================================>] 130 --.-K/s in 0s
>
> 2014-03-19 10:56:39 (8.76 MB/s) - `http-api.php?action=sendsms.1' saved
> [130/130]
>
> (then I hit 'cr' ot propmt doesn't come back)
>
> [1]- Done wget
> http://www.smsglobal.com/http-api.php?action=sendsms
> [4]+ Done to=mycellphone
>
>
>
>