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.
(27518 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.
(13700 hits) PHP SMS API v2.0 Download |
demo link not working
hi
Actually code is working message also arrives sms sending successfully but not receiving
please help
AM A LOOSU
So, shortcode can be viewed the most feasible method to
get a small enterprise. You may be the owner of a
Notebook, or perhaps an i – Pod, or possibly a music player or even an advanced Gaming
console when you purchase a cellphone along with its special features
and freebies. Technically designed bulk sms software broadcasts various personal or business sms with delayed
delivery feature to attenuate or reduce the load of sms broadcasting.
execuse sir, i want ask how to broadcast message from website to mobile u have any software to suggest
i have an error while executing the code “Notice: Undefined offset: 1 in class.sms.php on line 73
Call Stack
# Time Memory Function Location
1 0.0023 141448 {main}( ) ..\example.php:0
2 0.0076 192208 sms->login( ) ..\example.php:16
3 0.0076 192544 call_user_func ( ) ..\class.sms.php:45
4 0.0076 192560 sms->login_way2sms( ) ..\class.sms.php:45
Sending SMS …
( ! ) Notice: Undefined offset: 1 in class.sms.php on line 93
Call Stack
# Time Memory Function Location
1 0.0023 141448 {main}( ) ..\example.php:0
2 1.0200 192736 sms->send( ) ..\example.php:19
3 1.0200 193072 call_user_func ( ) ..\class.sms.php:53
4 1.0200 193088 sms->send_way2sms( ) ..\class.sms.php:53
( ! ) Notice: Undefined offset: 1 in class.sms.php on line 98
Call Stack
# Time Memory Function Location
1 0.0023 141448 {main}( ) ..\example.php:0
2 1.0200 192736 sms->send( ) ..\example.php:19
3 1.0200 193072 call_user_func ( ) ..\class.sms.php:53
4 1.0200 193088 sms->send_way2sms( ) ..\class.sms.php:53
Error encountered :
hi, just before i found your code, it tried to use it from my localhost. but its not working showing an error like
Logging in …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 65
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 98
kindly help me to solve it, i enabled curl and set the chagnes before you commented above. and i was tried to find the bug, the above errored lines are having a same variable of $matches. so got confused to solve it. please help to solve it.
hi,
i used this service in my web page by using 160by2 account, but it giving me error message like:
PHP Notice: Undefined offset: 1 in C:\inetpub\wwwroot\singlatimbers\SMS-API\class.sms.php on line 128
PHP Notice: Undefined offset: 1 in C:\inetpub\wwwroot\singlatimbers\SMS-API\class.sms.php on line 149
why this coming and Please help me to resolve this.
Thanks…
Logging in … Login error :
i got error using 160by2 but my username and password was correct.
hi, just before i found your code, it tried to use it from my localhost. but its not working showing an error like
Logging in …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 65
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 98
kindly help me to solve it, i enabled curl and set the chagnes before you commented above. and i was tried to find the bug, the above errored lines are having a same variable of $matches. so got confused to solve it. please help to solve it.
demo link not working please give guidelines
is its working for local server
nice Bulk sms services
hi, just before i found your code, it tried to use it from my localhost. but its not working showing an error like
Logging in …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 65
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\xampp\htdocs\SMS\class.sms.php on line 98
kindly help me to solve it, i enabled curl and set the chagnes before you commented above. and i was tried to find the bug, the above errored lines are having a same variable of $matches. so got confused to solve it. please help to solve it.
Thanks for the script .
steps to do before using this script . enable curl in php enviornment .
uploading it in domain (try using free cloud domain heroku, appfog,openshift) if you dont have one.
this script doesnot work fro 160by2 because the url passing for 160by2 login and sending sms are updated in 160by2 server. any one need to work and update the script.
but i am trying to do as beginner i dont know how to do. Atlast the script need to update to make it work
thanks
getting login error but when m trying with given details on way2sms, it’s working.
help me out asap.
thnks
Logging in …
Notice: Undefined offset: 1 in C:\wamp\www\sms\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in C:\wamp\www\sms\class.sms.php on line 93
Notice: Undefined offset: 1 in C:\wamp\www\sms\class.sms.php on line 98
Error encountered :
( ! ) Fatal error: Call to undefined function curl_init() in C:\wamp\www\bj\SMS-API2.0\class.curl.php on line 49
enable php.curl
Your source not working
enable php.curl
Hello! Do you know if they make any plugins to assist with Search Engine Optimization?
I’m trying to get my blog to rank for some targeted keywords but I’m not
seeing very good results. If you know of any
please share. Kudos!
Logging in …
Notice: Undefined offset: 1 in D:\ATTRACT\SMS-API\class.sms.php on line 65
Notice: Undefined offset: 1 in D:\ATTRACT\SMS-API\class.sms.php on line 73
Sending SMS …
Notice: Undefined offset: 1 in D:\ATTRACT\SMS-API\class.sms.php on line 94
Notice: Undefined offset: 1 in D:\ATTRACT\SMS-API\class.sms.php on line 100
Error encountered :
kindly help me to solve it, i enabled curl and set the chagnes before you commented above. and i was tried to find the bug, the above errored lines are having a same variable of $matches. so got confused to solve it. please help to solve it.
request you to reply as soon as possible… thanks in Advance.
Fatal error: Call to undefined function curl_init() in C:\wamp\www\test\SMS-API\class.curl.php on line 59
chitod me aise baat tu chupa k chali ai
khul jae vohi baat to duahi ho duahi
sabhi ap jese log code to banate ho lekin working nahi sirf error vala baki log ko kyo bevkuf banate he band karo e sab..
Hi Kiran,
i have downloaded textoo app. when i go to update gateways. but it shows, “update error:server sent an invalid response”. please mail me the solution as soon as possible.
Lawda kaam nahI karta bekar hi
good.
hi my name is surendra
Notice: Undefined offset: 1 in C:\wamp\www\sms example\class.sms.php on line 7
always appearing this error..
what u solution this error…
Notice: Undefined offset: 1 in C:\wamp\www\sms example\class.sms.php on line 93
Hii sir…
I’m a MCA student and make a project for Kisan. so i requires FREE SMS SEND apps .
please suggest me .
Hi colleagues, fastidious post and good arguments
commented here, I am really enjoying by these.
I used to be recommended this website via my cousin. I’m not certain whether or not this post is written via him as no one else understand such
detailed approximately my problem. You’re amazing! Thanks!
If some one wants expert view concerning running a blog after
that i propose him/her to pay a visit this blog, Keep up the good job.
I have learned newer and more effective things as a result of your web site. One other thing I’d like to say is the fact newer pc os’s are likely to allow additional memory to get used, but they also demand more ram simply to function. If one’s computer could not handle much more memory as well as newest program requires that memory increase, it may be the time to shop for a new Computer. Thanks
Good post. I learn somethіng totally new ɑnd challenging on blogs І stumbleupon every day.
It’s ɑlways exciting to read thr᧐ugh articles from other authors and
practice ѕomething from other web sites.
Yay google is my queen assisted me to find this
great site!
wonderful points altogether, you just gained a new reader.
What may you suggest in regards to your post
that you just made some days in the past? Any certain?
Hello every one, here every person is sharing such know-how, thus it’s good to
read this weblog, and I used to go to see this website daily.
same Error 73 65 lines
same Error 73 65 lines please put the salution
Es un goce encontrar a alguien que realmente sabe lo que están hablando en Internet . Definitivamente, que sabes cómo llevar un blog a la luz y que sea importante. Más personas tiene que leer esto.
Hеllo, after reaɗing thbis amazijng post i aam too cheerful
to ѕhaare my expеrience here with friends.