Technology Blog





Monday, October 31, 2011

Create Free SMS app using PHP, JSON API, cURL and txtWeb

The current period is SMS era. Where in just 140 character made twitter dominate the social media. We are used to have everything right now as "Short and Sweet".

In India Short Messaging Service is one of the most important mode of communication today, which gave birth to lot of Start ups concentrate on SMS based solutions. is one such website which provide more than 1000+ apps to choose for free of cost in India, USA & Canada.
Just type keyword for the service you are looking for and SMS it to 92433 42000 in India and 650.385.8882 in US and Canada.

The eagerness to make an SMS App drive me crazy so i felt it would help you too from this tutorial.

Step 1
Register at

txtWeb - Registration

Step 2

txtWeb - Welcome

Step 3
Verify the email inbox to activate your developer account


Step 4
There are two ways of creating SMS App here, in order to answer the dynamic input as SMS choose "Create txtApp"
Step 5
Enter the details of your FREE SMS application, the path is your web space where the below php script is to be uploaded via FTP.
Step 6
Test the SMS APP before publishing. We may make use of Emulator provided by them or our mobile phone

Click on Edit to get the Application Key

Step 7
Get the Application key and use it in the code where every needed
Step 8
Get the API KEY from with the help of our previous post "finding the Real IP address details"
< ?php
* GetIpDetails
* Author : S.MohanKumar
* IP API from
* SMS from
* Date : 1/Nov/2011 4:00AM IST
echo "<html>
<meta name="txtweb-appkey" content="">
if(isset($_GET['txtweb-message'])) $realIp = $_GET['txtweb-message'];
if(filter_var($realIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
$ipDetails_json =GetIpDetails($realIp);
$obj = json_decode($ipDetails_json);
echo "IPaddress : ".$obj->{'ipAddress'}."<br />"; // IpAddress
echo "Country name : ".$obj->{'countryName'}."<br />"; // countryName
echo "State name : ".$obj->{'regionName'}."<br />"; // regionName
echo "City name : ".$obj->{'cityName'}."<br />"; // cityName
echo "Latitude : ".$obj->{'latitude'}."<br />"; // latitude
echo "Longitude : ".$obj->{'longitude'}."<br />"; // longitude
echo "Time zone : ".$obj->{'timeZone'}."<br />"; // timeZone
else {
echo "Sorry Invalid IP address! Try again<br />@IpInfo Valid-IP";
function GetIpDetails($realIp){
//check if you have curl loaded
if(!function_exists("curl_init")) die("cURL extension is not installed");
// create a new cURL resource
$ch = curl_init();
// API Key
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_HEADER, false);
// grab URL and pass it to the browser
// close cURL resource, and free up system resources
return $ipDetails_json;
echo "</body>
Copy this code and upload into the web server path stated in Step 5 in input field "I want to enter an AppSite URL"

Step 9
Now Test the Application with Emulator provided by


Step 10
Enter inside the emulator as

The Output Will be like this.

SMS to 9243342000 (from India)
@IpInfo ValidIpaddress
Eg. @IPInfo


  1. Internet web marketing can make the world your oyster, that is, if you have a good plan, preparation and persistence in mind.

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Online Training from India . or learn thru JavaScript Online Training from India. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

  2. The service also uses a range of programming languages and API SMS integration. The perfect solution for your business.

  3. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    Digital Mobile Marketing
    SMS Marketing

  4. Nice it seems to be good post... It will get readers engagement on the article since readers engagement plays an vital role in every blog.i am expecting more updated posts from your hands.
    iOS App Development Company
    Android App Development Company

  5. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

    Sms marketing
    Text message marketing
    Fitness SMS

  6. Sometimes, we are unable to contact a person through a call and we might have to try several times to get access to them padisoft nigeria

  7. Compared to other methods, and considering it's high deliverability, there is no contest. SMS Messaging is the most cost effective method of communicating and promoting of products and services currently available.