I released my previous patch too soon, before my entire QA staff checked it ;) Apparently, the patched script works well for Nokia Orange phones, but doesn't work for Startac Orange phones. The symptom is that you get a message, but it says something like "BAD MESSAGE FORMAT", instead of the real message. After checking it out, I found that Orange added another field to its final form, which defines whether the message is Hebrew or not. It appears that Startac will refuse to accept messages that it thinks are in Hebrew (even when they are in English). The following patch adds the missing field, and messages can be sent to both Nokia and Startac phones. By the way, with some experimentation, it may also be possible to send Hebrew messages to Orange phones. However, I didn't try doing that (I don't think my Nokia can show Hebrew messages), and it probably won't work as-is in the current script. I left a few comments in the code about how this can perhaps be done, if someone is interested in giving it a try. In a couple of days, I'll put the complete script on my homepage. Meanwhile, people who already use my script (or one of its variants) will find the patches useful. ---------------------------------------------------------------------------- *** sendsms 2001/01/29 20:44:45 1.26 --- sendsms 2001/01/30 10:02:34 *************** *** 326,338 **** --- 326,357 ---- print STDERR $res->as_string. "\n"; exit 1; } + #debugging note: to see the various form fields we need to send to + #smsprocess.asp below, we should emulate the smssend.asp redirection + #Orange wanted us to do. I did it once, but it's not needed on every + #SMS sending. Uncomment the following to repeat this debugging: + # $req = new HTTP::Request POST => "$base/smssend.asp"; + # $req->header('Accept' => 'text/html'); + # $cookie_jar->add_cookie_header($req); + # $res = $ua->request($req); + # print $res->content; + # exit 1; # now, send the message + # The new "hebrew=1" parameter means (I think) that this is an + # English-only message. Without it, Startac phones refuse to show + # messages we send (Nokia shows it in any case). Perhaps setting + # hebrew=0 will allow sending Hebrew messages? I didn't experiment + # with it. Uncomment the above debugging code to see the entire + # Javascript dealing with Hebrew, and see what it does. + # I don't remember where I got the "108" in the counter calculation - + # it may no longer be true. But it doesn't seem to make any difference. $req = new HTTP::Request POST => "$base/smsprocess.asp"; $req->content_type('application/x-www-form-urlencoded'); $req->content( "mfn=".uri_escape($phonenum, "^A-Za-z")."&". "sender=".uri_escape($sender, "^A-Za-z")."&". "message=".uri_escape($mymessage, "^A-Za-z")."&". + "hebrew=1&". "counter=".(108-length($mymessage)-length($sender))); $req->header('Accept' => 'text/html'); # (put the cookies in the header) -- Nadav Har'El | Tuesday, Jan 30 2001, 6 Shevat 5761 [EMAIL PROTECTED] |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |May you live as long as you want - and http://nadav.harel.org.il |never want as long as you live. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]