Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Sending SMS texts

ITAITA Posts: 463Member
Hi, I'm wondering how to create a program which would be able to send SMS texts to mobile phones very similar to this: http://www.email2sms.ru.

Does anyone know how to do this?

Regards,

ITA
"Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"

Comments

  • infidelinfidel Posts: 2,900Member
    : Hi, I'm wondering how to create a program which would be able to send SMS texts to mobile phones very similar to this: http://www.email2sms.ru.
    :
    : Does anyone know how to do this?
    :
    : Regards,
    :
    : ITA
    : "Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"

    Is there a particular service you are going to use? I know nothing about SMS, but I guess that if there was a webservice that allowed you to send messages, then you could use one of python's builtin modules to send a request to it. Something like an HTTP request or SMTP message is pretty easy to construct and send.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • ITAITA Posts: 463Member

    : Is there a particular service you are going to use? I know nothing about SMS, but I guess that if there was a webservice that allowed you to send messages, then you could use one of python's builtin modules to send a request to it. Something like an HTTP request or SMTP message is pretty easy to construct and send.


    I know nothing about SMS either :-). I came across that website, and suddenly thought it'd be nice if I could write my own script to do it, rather than have to use theirs :-).

    I don't know how they do it for free though... Surely you have to pay for these texts that are sent!? As for the HTTP request, then yes, if say Orange, for example, had an interface/web service to their network, then I agree it would be relatively easy to do.

    Regards,

    Isaac

    "Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"

  • infidelinfidel Posts: 2,900Member
    [b][red]This message was edited by Moderator at 2006-2-24 7:42:56[/red][/b][hr]
    : I know nothing about SMS either :-). I came across that website, and suddenly thought it'd be nice if I could write my own script to do it, rather than have to use theirs :-).
    :
    : I don't know how they do it for free though... Surely you have to pay for these texts that are sent!? As for the HTTP request, then yes, if say Orange, for example, had an interface/web service to their network, then I agree it would be relatively easy to do.

    It looks like they offer a limited free service but also a pay service, where I assume you're able to send more or bigger messages.

    At any rate, here is an example of submitting form data in Python (from the module documentation of httplib):

    >>> import httplib, urllib
    >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
    >>> headers = {"Content-type": "application/x-www-form-urlencoded",
    ... "Accept": "text/plain"}
    >>> conn = ht[b][/b]tplib.HTTPConnection("musi-cal.mojam.com:80")
    >>> conn.request("POST", "/cgi-bin/query", params, headers)
    >>> response = conn.getresponse()
    >>> print response.status, response.reason
    200 OK
    >>> data = response.read()
    >>> conn.close()

    You can find the field names and URL, etc on the sms site. I don't know if they'd be happy with you scripting this kind of thing, though, you may want to ask them.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]



Sign In or Register to comment.