Re: [Bug-wget] wget with sms api help

2014-03-20 Thread Ángel González

On 20/03/14 03:06, voy...@sbt.net.au wrote:

On Thu, March 20, 2014 6:23 am, Ángel González wrote:


Note it's a very bad idea to send the username and password that way. I
think you would want to use https:// instead. And if your text is too long
for providing in the url, --post-data and --post-file are your friends.

Angel,

thanks for pointing out! I totally overlooked the https...
and, the post-file makes it easier, thanks again!!

works puurfect

# wget --post-file=smstxt
'https://www.smsglobal.com/http-api.php?action=sendsmsuser=mepassword=pswdfrom=meto=cell'

hm so..., could I also include like below in post-file?
action=sendsms
user=me
password=pswd

Voytek
Yes, of course. Just put in the file everything you would put after the 
? (without the ? itself, and keeping s, escaping, etc)






Re: [Bug-wget] wget with sms api help

2014-03-19 Thread Ángel González

On 19/03/14 01:04, voy...@sbt.net.au 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=sendsmsuser=mynamepassword=mypasswordfrom=myselfto=targetcellphonetext=Hello%20world


Note it's a very bad idea to send the username and password that way. I 
think you would want to use https:// instead.
And if your text is too long for providing in the url, --post-data and 
--post-file are your friends.





Re: [Bug-wget] wget with sms api help

2014-03-19 Thread voytek
On Thu, March 20, 2014 6:23 am, Ángel González wrote:

 Note it's a very bad idea to send the username and password that way. I
 think you would want to use https:// instead. And if your text is too long
 for providing in the url, --post-data and --post-file are your friends.

Angel,

thanks for pointing out! I totally overlooked the https...
and, the post-file makes it easier, thanks again!!

works puurfect

# wget --post-file=smstxt
'https://www.smsglobal.com/http-api.php?action=sendsmsuser=mepassword=pswdfrom=meto=cell'

hm so..., could I also include like below in post-file?
action=sendsms
user=me
password=pswd

Voytek




[Bug-wget] wget with sms api help

2014-03-18 Thread voytek
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=sendsmsuser=mynamepassword=mypasswordfrom=myselfto=targetcellphonetext=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=sendsmsuser=mynamepassword=mypasswordfrom=mysekfto=targetcellphonetext=Hello%20world

[1] 18942
[2] 18943
[3] 18944
[4] 18945
[2]   Doneuser=myname
[3]-  Donepassword=mypassworde  from=myself
# --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]-  Donewget
http://www.smsglobal.com/http-api.php?action=sendsms
[4]+  Doneto=mycellphone