youngj / EnvayaSMS

Simple SMS and MMS gateway running on Android
http://sms.envaya.org
Other
159 stars 177 forks source link

What about a TAG function? #11

Closed ChrisBdk closed 12 years ago

ChrisBdk commented 12 years ago

It would be nice, if it has a TAG or "campaign" function if you will. So it takes out the first word before the first "space" and adds it to the POST string.. Like this: Vote Lady Gaga or MSG bla bla bla...

Hope you can see the idear..

Cheers...

youngj commented 12 years ago

This would be easy to implement on the server side, e.g:

list($tag, $rest) = explode(' ', $_POST['message'], 2);

For envaya.org's SMS system, we accomplish a similar thing by matching regexes:

https://github.com/youngj/Envaya/blob/master/engine/sms/controller/news.php

One of the design principles of EnvayaSMS is that the Android app should be as generic/simple as possible, and anything that can be done on the server should be done on the server.