- Home
- About
- My work
- Photoshop poster design
- Kaun banega crorepati game (kbc2) (download the game)
- Textoo : iPhone (and now Android) app to send free SMS using web gateways
- 3ds max animation
- Multi user avatar chat based flash website for Incident 09
- Video editing / post production / audio mixing
- Joomla real estate component built using ExtJS
- Facebook cricket betting application
- Swishmax projects & Flash website for Incident 08 using Swish
- PHP-Selenium Framework for UI Automation
- PHP based CMS with chat
- Twitter reputation score
- Downloads
- Contact
PHP class to send SMS using free SMS gateways
17th Dec ’10 :
Now here’s the deal. 160by2,way2sms and freesms8 offer free SMS and earn money through the ads on their website. By using this PHP script, we are bypassing their website illegally as their ad never gets shown. I hope you will keep this in mind when you use this script. If you want to send free SMS legally, then head over to http://freesmsapi.com and create an account. They are offering an excellent service totally free of cost.
Also the developers at way2sms and freesms8 keep changing their url’s and security methods to prevent such scripts from working (160by2.com guys are cool about this). And as this PHP code published here can be viewed publicly, their jobs become easy. So I will not be able to continue development of the scripts because as soon as I publish the code here, way2sms/freesms8 change their code to break my code.
So there should be a way to restrict access to the PHP code published here so that the code reaches appropriate hands only. Maybe a password protected SVN or forums based on reputation points, I dont know..
Post in your opinions about this as a comment and lets see whether we can work it out together.
Update as of 5th Oct ’10 : Bulk SMS services restored !!
Update as of 24th Sep ’10 : Govt has banned bulk sms temporarily. So all the bulk sms providers have stopped their services. More info. This script will not work till Sep 29th. In the meantime, I will upload the next version of the script which can check internet connectivity, login errors and other responses sent by the gateway. I will also be adding support for freesmsapi.com and freesms8.com gateways.
Update as of 10th Sep ’10: The code has been updated to accomodate a small change in the way2sms website.
Update as of 15th Aug ’10 : The code has been updated to work on all 160by2 and way2sms accounts and also will fetch any error codes being generated by these gateways. If you encounter any bugs, drop in a comment.
This is a PHP script I wrote a while back to automate the sending of SMS/text message using 160by2.com/way2sms.com account.
You can use this PHP API script to send free sms India, Kuwait, Singapore, UAE, Phillipines, Malaysia etc. Very useful if you are combining this with the registration page of your website to verify the users mobile number similar to verification of their email address.
Some possible real world applications of this script are :
1. Email to SMS.
2. Birthday alerts/Daily joke/thought for the day/news SMS
3. Gtalk/XMPP to SMS
Pre-requisites to use this script :
1.You need a hosting server with PHP5 and cURL extension enabled. The server should be able to open socket connections to other servers.
2.a valid,verified 160by2.com account or way2sms.com account (Create an account for free on one of these gateways and send a test SMS through their UI first.)
Example Usage (Also included in example.php):
include_once “class.curl.php”;
include_once “class.sms.php”;$smsapp=new sms();
$smsapp->setGateway(‘way2sms’); // you can set gateway to be 160by2 to use your 160by2 account;
// way2sms code has been tested on different accounts to be stable.echo “Logging in … “;
$smsapp->login(‘username for way2sms’,'password’);echo “Sending SMS … “;
$result=$smsapp->send(’10 digit mobile number’,'Your text message’);if($result)
{
echo “Message sent”;
}
else
{
echo “Error encountered : “.$smsapp->getLastError();
}
Limitations :
1. 160by2.com offers a character limit of around 145 for each message. Way2sms offers a character limit of 140 characters per message. Please see that the character limit is honored.
2. also a limit of 50 messages per day per account and 10 messages per recepient phone number holds good for 160by2.
(27437 hits) SMS API Download |
Demo:
Click here for a simple demo application to send free SMS using this API
I had also written a script using this class to send an sms alert to notify as soon as the booking for an upcoming movie opens up on bookmyshow.com, if someones interested in using this bookmyshow script, drop in a comment.
New SMS API
Supports 160by2, freesmsapi, freesms8. Does not support way2sms as of now.
To send free SMS all over the world using your iPhone/iPod touch, use Textoo Pro app. It is currently the best iphone app to send free unlimited text messages easily.
(13638 hits) PHP SMS API v2.0 Download |
Incoming search terms:
160by2, 160by2 api php, aircel sms api, airtel sms api, API, Bulk, bulk sms, change, character, com, curl 160by2, curl freesms8, curl freesmsapi, curl way2sms, daily joke, docomo sms api, dowload free texting api for bulk sms, download, drop, email2sms, error codes, free api for sms, free bulk sms api, free sms, free sms all over the world, free sms gateway for php, free sms gateways, free sms sites without registration in india, free text api, freesmsapi, gateway, gtalk, how to send free sms using PHP, india sms script, internet connectivity, internet gateway api for free sms, iphone, login errors, password, php api, php code, php code to send sms using way2sms, php script to send sms, php sms gateway, programmatic sms send, reliance sms api, reputation points, result, scri, security methods, send free sms through the web, send free sms using php, sms airtel php, sms api, sms php, socket connections, text message using php, unofficial 160by2 api, Update, vodafone sms api, way, way2sms, way2sms.com, web to sms api for free
Print article | This entry was posted by Kiran Kumar on August 3, 2010 at 9:43 pm, and is filed under Misc. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
What’s my twitter reputation score ?
about 13 years ago - 1 comment
Last month, Twitter founder Evan Williams announced during the Web 2.0 summit that Twitter.com internally keeps a record of every users reputation score. This made me wonder how do they calculate each users reputation mathematically. After some thought, I charted out a few parameters based on which they could possibly arrive at a quantitative measure…
Java resource bundle modification to identify hardcoded strings
about 13 years ago - 1 comment
Was involved in the modification of the Java ResourceBundle class to make it optionally decorate all the strings coming from any specific resource bundle with certain special characters so that visual identification of hardcoded strings is possible.
Chat with me
about 13 years ago - 85 comments
I am Available mostly between 11 am to 6 pm (GMT + 5.30). If I appear offline, just drop in a mail. I will respond to it ASAP. Incoming search terms:kiran kumar karne (3)contact kiran kumar (3)160by2 (2)www the kiran kumar com (2)kiran kumar u (2)yhsm-inucbr_001 (2)freesms8 cannot edit contact (1)play online falsh gamescrorepati (1)sardughar…
27th Oct – Appcelerator Titanium Webinar Recording , questions and answers
about 13 years ago - 4 comments
Recording Watch the webcast recording for the Q&A session here Q&A Transcript These are the questions and answers which were posted during the Titanium webinar which took place on 27th Oct 2010 Q: Will Blackberry still be windows only? A: it’ll be mac when RIM adds a Mac simulator Audience Question Q: Does Titanium support…
Titanium Mobile vs Sencha Touch
about 13 years ago - 9 comments
I just tried out the sencha touch examples on the android 1.6 simulator and the performance is pathetic. Seems like google forgot to properly implement their javascript V8 engine onto their OS. Appcelerator’s Titanium Mobile and Sencha touch are 2 different frameworks which address a totally different set of audiences. Comparing them is like comparing…
Video editing / post production / audio mixing
about 13 years ago - 3 comments
These are the 3 parts of the short film made for final year smriti DVD for my college engineering branch.The camera work, editing and background score stitching was done by me.
Kaun banega crorepati game (kbc2) (download the game)
about 13 years ago - 300 comments
Update as of 5th June 2011 : Source code for the game has been published on this page. Now you can change the game as you wish, using Swishmax (www.swishzone.com) Update as of 20th Dec 2010 : I have been noticing quite a lot of visitors reaching this page through google search. So drop in…
3ds max animation
about 13 years ago - 4 comments
Playiing with reflection & refraction materials combined with smoke and particles became my new way to pass time. With help from the ’3dsmax 6 Bible’, I learnt a few basics. Here are some of the videos I rendered:
Textoo : iPhone (and now Android) app to send free SMS using web gateways
about 13 years ago - 4 comments
Textoo, the first iPhone/Android app I made to send free SMS to India using web gateways. Made using Titanium SDK and PHP on server side. More info at http://textoo.in
Multi user avatar chat based flash website for Incident 09
about 13 years ago - 18 comments
Website fully built on Flash CS3 & Actionscript 3, Poser,Photoshop, Google sketchup, PHP 5 – Multi user avatar based realtime chat uses PHP backend. Explore 3d map of my college , chat bot, user moderation based on XMPP etc
about 12 years ago
hi kiran,
I use your code but still error in that Error encountered :
if any solution to avoid this let me……….
about 12 years ago
this is not working …..
Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\sms\class.curl.php on line 59
about 12 years ago
code is not working properly
Error encountered :
about 12 years ago
Logging in … Sending SMS …
Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\Admin\SMS-API2.0\class.curl.php on line 49
about 12 years ago
Logging in …
Notice: Undefined index: 1 in D:\inetpub\vhosts\modernwebs.in\httpdocs\class.sms.php on line 73
Sending SMS …
Notice: Undefined index: 1 in D:\inetpub\vhosts\modernwebs.in\httpdocs\class.sms.php on line 93
Notice: Undefined index: 1 in D:\inetpub\vhosts\modernwebs.in\httpdocs\class.sms.php on line 98
Error encountered :
about 12 years ago
hey frnds this must include curl.php and sms.php files defined in a class php…kkk
about 12 years ago
when i use the it gives following error:
Logging in …
Notice: Undefined offset: 1 in D:\Imran Ansari\My Installed programs\xampp\htdocs\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in D:\Imran Ansari\My Installed programs\xampp\htdocs\class.sms.php on line 93
Notice: Undefined offset: 1 in D:\Imran Ansari\My Installed programs\xampp\htdocs\class.sms.php on line 98
Error encountered :
about 12 years ago
hey dude this is not working…
can u updated it…
way2sms and 160by2 both change their way of authentication and sending message..
about 12 years ago
hai i published 160by2 api for sending free sms using your 160by2 account.
to download visit :-
http://haarisoft.tk/160by2-sms-api
about 12 years ago
Logging in …
Notice: Undefined offset: 1 in C:\wamp\www\online examination code\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\wamp\www\online examination code\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\wamp\www\online examination code\class.sms.php on line 98
Error encountered :
this are d errors i encountered plzz tell m d solution aesp
about 12 years ago
Haai folks,
Here is the working PHP-cURL,JAVA,C++,vb way2sms api (alfasms api) with full source code ,used by millions.(without curl script is also avilable )
Visit http://Www.Alfredfrancis.in/alfasms-api now.
Use it & share it
about 12 years ago
Hey, Visit http://haarisoft.tk/160by2-sms-api/ for more usefull code
about 12 years ago
Hey I am Created a Free international SMS API for all countries.Developed in PHP and requires cURL extention to work. Get it @ http://www.alfredfrancis.in/free-international-sms-api/
about 12 years ago
hey guys,
why are you waiting. visit http://haarisoft.tk/160by2-sms-api/ for the ultimate 160by2 sms api using PHP CURL.
So Visit…..Download…….Share….& Enjoy it…
about 12 years ago
this is great open source code
about 12 years ago
Haai folks,
Here is the working PHP – cURL,JAVA,C++,vb..etc way2sms API ,160by2 API,FullonSMS API.SMS440 API,site2sms API,wayforsms API. with full source code ,used by millions.(non curl script is also avilable )
Visit http://Www.Alfredfrancis.in/alfasms-api now.
Use it & share it
about 12 years ago
Gyus here is fresh code for sending sms using way2sms..
developed in PHP and and curl library is need for running the script
just follow the link
http://ritesh-chandora.blogspot.in/2012/02/php-code-for-sending-free-sms.html
about 12 years ago
YO!…!
Awesome.. Thanks for the post and share!.. Great stuff!.
Have you seen this website as well?
http://www.UseFreeSMS.com
Completely Free and NO registration!
Thanks again!
JB
about 12 years ago
I got an eror;
Logging in …
( ! ) Notice: Undefined offset: 1 in C:\wamp\www\SMS -php\final code\class.sms.php on line 128
Call Stack
# Time Memory Function Location
1 0.0005 370384 {main}( ) ..\sms-code.php:0
2 0.0361 471488 sms->login( ) ..\sms-code.php:12
3 0.0362 471792 call_user_func ( ) ..\class.sms.php:45
4 0.0362 471808 sms->login_160by2( ) ..\class.sms.php:45
Sending SMS …
( ! ) Notice: Undefined offset: 1 in C:\wamp\www\SMS -php\final code\class.sms.php on line 149
Call Stack
# Time Memory Function Location
1 0.0005 370384 {main}( ) ..\sms-code.php:0
2 0.4956 471592 sms->send( ) ..\sms-code.php:15
3 0.4956 471896 call_user_func ( ) ..\class.sms.php:53
4 0.4957 471912 sms->send_160by2( ) ..\class.sms.php:53
Error encountered :
about 12 years ago
hi this is my error….how to clear itLogging in …
( ! ) Fatal error: Call to undefined function curl_init() in C:\wamp\www\SMS-API(1)\class.curl.php on line 59
Call Stack
# Time Memory Function Location
1 0.0003 369664 {main}( ) ..\example.php:0
2 0.0025 477640 sms->login( ) ..\example.php:16
3 0.0025 477944 call_user_func ( ) ..\class.sms.php:45
4 0.0025 477960 sms->login_way2sms( ) ..\class.sms.php:45
5 0.0025 478072 cURL->post( ) ..\class.sms.php:62
about 12 years ago
Here is the working PHP – cURL,JAVA,C++,vb..etc way2sms API ,160by2 API,FullonSMS API.SMS440 API,site2sms API,wayforsms API. with full source code ,used by millions.(non curl script is also avilable )
Visit http://Www.Alfredfrancis.in/alfasms-api now.
about 12 years ago
Free internaional SMS api added to AlfaSMS API >> http://www.alfredfrancis.in/free-international-sms-api/
about 12 years ago
visit http://harishjose.in/haarisoft-sms-api for getting way2sms ,160by2, and fullonsms api. the php curl script
about 12 years ago
For way2sms,160by2,fullonsms,site2sms,sms440..etc PHP,JAVA,C++,VB,VB.NET etc APIs >> Visit http://Www.Alfredfrancis.in/alfasms-api now.
about 12 years ago
dude…..pls check and update ur code!!!its not wrking
about 12 years ago
Hii See Here All Apis With InternationalSms Sending
http://neway4u.tk
about 12 years ago
hi can you please give help me in developing the script demo like above
about 12 years ago
i am unable to send sms please help me regarding same
about 12 years ago
hey brother i have an error while executing the code “Notice: Undefined offset: 1 in C:\wamp\www\SMS-API\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\wamp\www\SMS-API\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\wamp\www\SMS-API\class.sms.php on line 98
Error encountered”;
about 11 years ago
Hi admin,
Please include http://ezfreesms.com to send free international SMS without registration. It supports all the countries.
about 11 years ago
Hello Kiran,
Thank you for your wonderful post on sending SMSs via free gateways using PHP. For testing your script, I just want to download the script of you were written. When I tried, I found that it leads to 404 page.
Can you let me know if there is a link I can download it. Otherwise it will be wonderful to get the code directly from the coder itself.
Waiting for your response.
Thanks & Regards
Anish.
about 11 years ago
yes the requested page is not found
about 11 years ago
WTF ..Where is the link….
about 11 years ago
i come in way2sms
about 11 years ago
Check out API’s i offer
http://api.madsacsoft.tk/
about 11 years ago
Download link is not working….
about 11 years ago
i love it
about 11 years ago
this game is very high level.
about 11 years ago
We want use the bulk sms pack in our site
about 11 years ago
plz send me code of msz gateway
about 11 years ago
u done good work buddy..
I would like to know i can use the same PHP code for a ASP.NET C# project or not ??
about 11 years ago
without API php script sending sms and no chageble for sms
about 11 years ago
Pretty! This was an extremely wonderful post. Many thanks
for supplying this info.
about 11 years ago
tnks it works
about 11 years ago
shall i know how did you make it?
about 11 years ago
Good work dude..can you send this code to my mail…
about 11 years ago
NOT WORKING…………..
about 11 years ago
download link not working
about 11 years ago
The Code iS Not Properly Work
about 11 years ago
plz send me the api from any sms provider I really need it
about 11 years ago
Its showing some error in the argument of send as
Parse error: syntax error, unexpected ‘in’ (T_STRING), expecting ‘,’ or ‘;’ in C:\wampserver\www\test\sms check.php on line 9
about 11 years ago
please send me the api for 160by2 or waytosms
about 11 years ago
I want to make a simple PHP Script which allows my users to send SMS that they have choosen from my site.
Here on this page: http://freesmsbook.com/l-o-v-e/
I have one sms, now I want to put one button like Send SMS, which should prompt for only Mobile No and this msg should be sent over that number.
http://freesmsbook.com/ is my site and I want to integrate this service to each of my individual page. When recipient get this SMS in their Cell, it should come from Free SMS Book only.
Is it possible?
about 11 years ago
demo link not working