Kung Fu Kung Fu

Fujian White Crane Kung Fu

Zope Zope

What I have and am doing with Zope

Photos Photos

Photoalbum, both old and new.

Receptsamlingen Receptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact me Contact me

My contact details and how to contact me.

  Mobile version of this page Mobile version of this page


 

Guess my age with MOBi

http://www.mobi.co.uk

sms response, mobi, sms, 25p, 83211

21st of April 2007

Guess my age with MOBi This week we improved MOBi with a neat little feature that makes it possible to decide what the SMS response should be to inbound SMS on your own server.

To test this you need to be UK resident and willing to part with the 25p it costs to receive the response. Send peterbe is NN (where NN is a number, how old you think I am) to 83211 and await a result. I've set up the sub word "is *" to forward all inbound SMS to an address on www.peterbe.com and here on this server I run the following Python Script:

 ##parameters=sender, message
 ##
 guess = message.split()[-1]
 try:
     age = int(guess)
 except ValueError:
     return "That's not a number :-("

 if age > 27:
     return "That's not it! It's less than that. Try again"
 elif age < 27:
     return "That's not it! It's more than that. Try again"
 return "Wow! You know my age!!"


Comment

 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.