Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get mobile inbox message from mobile to database using php?

I want to fetch message from mobile inbox and store in database for further accessing in site. For that I did some R&D from Nokia forum.

But it needs that phone should connected to pc for loading and required to access through pc suite.

I don’t want to access through pc suite. Because different mobile have different pc suite so it should not dependent on the pc suite. Is there any way to do with PHP with out PC suit connectivity?

I came to know that it may possible with AT command, I also go through the AT command usage in network. But I didn’t have much idea. So i want to develop it with the help of PHP. Let me know if there any solution to do this. And suggest some idea or reference so that i may refer that to learn more to focus on this.

Thanks in advance

like image 846
Yadav Chetan Avatar asked Apr 17 '13 06:04

Yadav Chetan


2 Answers

I am very much happy to see this question because, I had a similar requirement for one of my project. I found a solution and still its working perfectly for last one and half years.

I designed an architecture diagram for this.

Architecture Diagram

This kind of architecture needs a mobile application as well as a web application.

You want to develop your mobile application in such a way that, when ever an incoming message event occurs, your application will generate a HTTP request to your web application API, which is a PHP page.

Your application generated HTTP request will be something like this

http://www.myownhost.com/API/apipage.php?senderNumber=9876543210&&message=recievedMessage&&applicationID=1234

Your API code will be something like this

apipage.php (This page act as your solution API)

<?php
if ( isset( $_GET['senderNumber'] ) && isset( $_GET['recievedMessage'] ) && isset( $_GET['applicationID'] ) ) 
{
   $senderNumber = $_GET['senderNumber'];
   $message      = $_GET['recievedMessage'];
   $appId        = $_GET['applicationID'];

   /*

        Write your code to insert values in database.

   */


}

?>

Generate HTTP request from a mobile device is an easy task, because HTTP libraries/Classes are already available in JAVA.

I did my mobile application in Android and still that application is working well.

Advantages of this type of architecture are

  1. We are able to use same web API for different mobile devices because we are sending data through HTTP
  2. You will be able to control device requests from API(Block/Allow/Forward)
  3. Easy implementation
like image 142
Javad Shareef Avatar answered Oct 21 '22 07:10

Javad Shareef


Maybe a device like hardware sms gateway would be a resolution for you. This is a device which you buy, put inside a SIM card from your mobile operator, connect it to your LAN. You can send and receive sms messages with it with HTTP API (that's your scenario) or directly on a web-interface of the device.

Hardware sms gateways are devices that are like a small computer with built-in GSM-modem. They usually operate on Linux, have built-in database and a web server.

  • Pros: reliability (sms messages are stored inside a device's database, there are usually fail-over mechanisms for GSM-modem), scalability, less pain with integration.

  • Cons: money. You have to make one time investment in such a device.

One example of such hardware sms gateway is SMSEagle. See if this suits you

Disclaimer: I work for SMSEagle

like image 43
Radoslaw Avatar answered Oct 21 '22 08:10

Radoslaw