SRL Archive - Web Development

SMS Messages to Web Server


Bobzilla69

2012-06-15 04:03:17

Hi All,

This might be the wrong place but didnt know where else to post it.

I want to setup a system where i can send a text to a web server and extract text from the text to then be stored into a database for later use.

Does anyone know of a system that allows me to send texts to a web server?

i would prefer it if it was free but i know thats not always possible.

Thanks

putonajonny

2012-06-15 05:46:44

when you say text, just confirming you mean mobile phone texts, not just bits of text?

Bobzilla69

2012-06-15 05:55:11

yes i mean i will sent it a text message (sms) and then i will try to, if possible, extract a certain bit of the text message to be stored, i dont really need the whole text message to be stored in the database only a certain section.

just to give you more on an idea, the text message will always be the same format, certain sections will be different like the time but generally it should be the same.

putonajonny

2012-06-15 09:43:03

From: Bobzilla69
yes i mean i will sent it a text message (sms) and then i will try to, if possible, extract a certain bit of the text message to be stored, i dont really need the whole text message to be stored in the database only a certain section.

just to give you more on an idea, the text message will always be the same format, certain sections will be different like the time but generally it should be the same.


Sorry I completely missed the title of this thread :duh:

My old phone could be plugged into a computer, then all the texts could be sent and received by the computer, the computer could then upload them to a web server easily if you could get the texts read by a program.

Otherwise in terms of online services, I don't know of any free ones

Bobzilla69

2012-06-15 10:17:16

From: putonajonny
Sorry I completely missed the title of this thread :duh:

My old phone could be plugged into a computer, then all the texts could be sent and received by the computer, the computer could then upload them to a web server easily if you could get the texts read by a program.

Otherwise in terms of online services, I don't know of any free ones


no problem, we all misread things now and again.

there have to be some way of allowing me to do this, maybe i should think about an android app that could send a specific persons (contacts) text messages to the web.

turkkanka

2012-06-15 10:24:25

if youv got an iphone i believe you can use icloud for this

Bobarkinator

2012-06-15 11:05:01

Get a Google Voice account. Write a program to read text messages from the Voice account. You have a couple of framework options depending on what language you want to go. pygooglevoice is a Python framework, I a little experience with that one over a year ago but it did what I wanted so I can recommend it. google-voice-java is a Java framework for interfacing with Google Voice. Most people around here are more comfortable with Java, but I've personally never used this one.

So you use one of those frameworks to grab the texts from the Google Voice account. Interpret them and send them off to a database.

Bobzilla69

2012-06-16 04:18:37

Oh that seems very interesting, thanks i will take a look at it

Turpinator

2012-06-23 19:15:17

I read this over last week some time, but never had the time to reply. Either the google voice option as previously stated may work well… or… i would suggest reverting back to the simple act of SMS-ing an email address.
From there the webserver would check then check a specific email and then… do what you want with it. you could also have it go the otherway by having the websever sending an email to your phone using a 'email/phone gateway' (######@carrier.com) or something.

Master BAW

2012-06-29 09:04:03

why textmessages? I think email would be easier, because that's via internet and if you have an iPhone with internet it will work. It's also very easy to make, all you need is a little PHP knowledge. I can help you with that if you want. All you really need to do is something this:

[php]
<?php
function putindb($dbcontent){
//here your db connection and query to put the content into the DB.
}


$mailcontent = wordwrap('Hey you\'ve bot mail! \n\n '.$_GET['mailcontent']);
$dbcontent = $_GET['dbcontent'];
$email = 'blabla@blabla.com';//your email here
$subject = 'BotMail: ' . $_GET['subject'];

if(mail($email,$subject,$mailcontent)){

if(putindb($dbcontent) == True){
echo'SUCCESS';
} else {
echo'FAIL';
}


} else {
echo'FAIL';
}



?>
[/php]

you can send a mail and something into your DB with this in simba:




procedure SendMail(mail,db,subject: string): boolean;
var
Return: string;
begin
mail := ReplaceRegExpr(' ', mail, '%20', True);
db := ReplaceRegExpr(' ', db, '%20', True);
subject := ReplaceRegExpr(' ', subject, '%20', True);

Return:= GetPage('http://yourwebsite.com/yourpage.php?subject='+subject+'&dbcontent='+db+'&mailcontent='+mail+'');

if Return = 'SUCCESS' then Result := True else Result := False;

end;



Hope I helped..
Not helped, because you don't need this? nvm, I will probably use this myself :D .
Questions? PM me.
P.S. sorry for the bad scripting but I wrote this inside this field on villavu forum so its hard to use tab and stuff, lol ;)

Bobzilla69

2012-06-29 09:36:45

From: MasterCrimez
why textmessages? I think email would be easier, because that's via internet and if you have an iPhone with internet it will work. It's also very easy to make, all you need is a little PHP knowledge. I can help you with that if you want. All you really need to do is something this:

[php]
<?php
function putindb($dbcontent){
//here your db connection and query to put the content into the DB.
}


$mailcontent = wordwrap('Hey you\'ve bot mail! \n\n '.$_GET['mailcontent']);
$dbcontent = $_GET['dbcontent'];
$email = 'blabla@blabla.com';//your email here
$subject = 'BotMail: ' . $_GET['subject'];

if(mail($email,$subject,$mailcontent)){

if(putindb($dbcontent) == True){
echo'SUCCESS';
} else {
echo'FAIL';
}


} else {
echo'FAIL';
}



?>
[/php]

you can send a mail and something into your DB with this in simba:




procedure SendMail(mail,db,subject: string): boolean;
var
Return: string;
begin
mail := ReplaceRegExpr(' ', mail, '%20', True);
db := ReplaceRegExpr(' ', db, '%20', True);
subject := ReplaceRegExpr(' ', subject, '%20', True);

Return:= GetPage('http://yourwebsite.com/yourpage.php?subject='+subject+'&dbcontent='+db+'&mailcontent='+mail+'');

if Return = 'SUCCESS' then Result := True else Result := False;

end;



Hope I helped..
Not helped, because you don't need this? nvm, I will probably use this myself :D .
Questions? PM me.
P.S. sorry for the bad scripting but I wrote this inside this field on villavu forum so its hard to use tab and stuff, lol ;)


Thanks for the thought but not possible for what i am doing, i only have access to text messaging other wise i would have just done it all through php/web.

if anyone else knows of ways i would love to know about them

putonajonny

2012-06-29 09:49:13

Virtual SIM Hosting (VSIM)
VSIM - Receive SMS to a SIM number of your choice - excellent throughput!
The VSIM solution provides a high performance method of receiving up to 50 SMS per second through a customer supplied SIM. The mobile number of the SIM can be used to receive SMS without the restrictions of normal SIM card hosting. The service supports approximately 420 mobile networks worldwide and is a means of getting the performance of Virtual Mobile Numbers (VMNs) with the advantage of a national mobile number, e.g. a SIM from a mobile network in France for use with a service targeted at mobile users in France.

Not free though: http://www.hslsms.com/services/receive-sms/

It supports all the major networks in my country, not sure about others though

grats

2012-07-06 00:53:28

I was thinking about doing something kind of like that, I wanted to text message my server and have it send me the weather (lol) was useful because usually up in the mountains have 160 acres, no electricity etc

My phone can send simple email through the text message thing so might do it like that as suggested in the thread, didn't think about that.

So there are no easy ways to do it through SMS I'm guessing you have to have a phone number to your server (google voice) or some fancy thing?