From: "Ara.T.Howard" Date: 2003-10-02T23:46:44+09:00 Subject: Re: http-access2 POSTing On Thu, 2 Oct 2003, Andi Scharfstein wrote: > Hi, I've been expecting a certain eMail for some time now, and I have never > been good with waiting for mail. So, in order to have something to do to > distract me from waiting, I decided to write a script that would forward the > mail to my cellphone using SMS. I am using a German FreeSMS provider > (http://www.myskoda.de) which doesn't expressly forbid automated use of its > services, so it's kind of legal ;) So, after creating an account there, I > tried writing my script, but it doesn't do what I want it to... I expect > this is a result of my lack of understanding of HTTP messages. I am using > http-access2 to access a form on the FreeSMS site that has the following > structure: > >
> > > > >
> > After logging in [client.get('http://www.myskoda.de/index.html', {"callname" > => "mylogin", "password" => "mypass"})], which works as expected, so sending the authentication this way works. > I try to do the following: > client.post('http://www.myskoda.de/emailsys/sms/sms.html', {"network" => > "151", "number" => "12345678", "msg" => text}) i don't know this api - but is the autentication information sent (automatically) again here? typically browsers do this for once you've done it once, but i don't know if this object does that or not? > where text is a string that does not exceed 147 chars (that's 160 chars > maximum in a SMS message minus the MySkoda ad). This doesn't work: All I get > is the same site again (which is OK, it's the same URL), but it should say > "Message sent, now 4 messages left [for this month]", which it doesn't. Yes, > I know that's a kind of unusual question. Any ideas? > > -- > Thanks: Andi S. > ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 | The difference between art and science is that science is what we understand | well enough to explain to a computer. Art is everything else. | -- Donald Knuth, "Discover" | ~ > /bin/sh -c 'for lang in ruby perl; do $lang -e "print \"\x3a\x2d\x29\x0a\""; done' ====================================