...

View Full Version : Sending SMS Through Http API



nanoop13
03-21-2009, 05:26 PM
Hi there!!
I am very new to PHP.I wanted to integrate a thankyou message for those who fill up the contact form on my website.I have got the following variables :

username = Your_username
password = your_password
sender = anoop
toRecipient = Number (one at a time)
message = Actual Message to be sent(The message needs to be URL encoded)

The API call for sending sms is
http:/ / sms.anooptechnology.com/pushsms.php?username=Your_username&password=your_password&sender=anoop&to=myrecipient&message=Hello

I am not able to integrate it into the contact form of my website.Any help will be appreciated.
Thanks and Regards,
N Anoop

slappyjaw
03-21-2009, 06:26 PM
You could purchase an sms api but that would cost you some money. Your best bet is to go online and look for all the email address there are for cell phones. For example verizon might be yournumber@verizonwireless.com. So make your form so that they have to pick there provider.

slappyjaw
03-21-2009, 06:28 PM
Provider SMS Email Address
3 River Wireless phonenumber@sms.3rivers.net
ACS Wireless phonenumber@paging.acswireless.com
Advantage Communications 10digitpagernumber@advantagepaging.com
Airtouch Pagers 10digitpagernumber@myairmail.com
Airtouch Pagers 10digitpagernumber@alphapage.airtouch.com
Airtouch Pagers 10digitpagernumber@airtouch.net
Airtouch Pagers 10digitpagernumber@airtouchpaging.com
AlphNow pin@alphanow.net
Alltel 10digitphonenumber@alltelmessage.com
Alltel PCS 10digitphonenumber@message.alltel.com
Ameritech Paging 10digitpagernumber@paging.acswireless.com
Ameritech Paging 10digitpagernumber@pageapi.com
Ameritech Clearpath 10digitpagernumber@clearpath.acswireless.com
Andhra Pradesh Airtel phonenumber@airtelap.com
Arch Pagers (PageNet) 10digitpagernumber@archwireless.net
Arch Pagers (PageNet) 10digitpagernumber@epage.arch.com
Arch Pagers (PageNet) 10digitpagernumber@archwireless.net
AT&T PCS 10digitphonenumber@mobile.att.net
AT&T Pocketnet PCS 10digitphonenumber@dpcs.mobile.att.net
Beepwear pagernumber@beepwear.net
BeeLine GSM phonenumber@sms.beemail.ru
Bell Atlantic phonenumber@message.bam.com
Bell Canada phonenumber@txt.bellmobility.ca
Bell Canada phonenumber@bellmobility.ca
Bell Mobility number@txt.bellmobility.ca
Bell South (Blackberry) number@bellsouthtips.com
Bell South phonenumber@sms.bellsouth.com
Bell South phonenumber@wireless.bellsouth.com
Bell South phonenumber@blsdcs.net
Bell South phonenumber@bellsouth.cl
Bell South Mobility phonenumber@blsdcs.net
Bluegrass Cellular phonenumber@sms.bluecell.com
BPL mobile phonenumber@bplmobile.com
Carolina Mobile Communications 10digitpagernumber@cmcpaging.com
Cellular One East Coast phonenumber@phone.cellone.net
Cellular One South West phonenumber@swmsg.com
Cellular One PCS phonenumber@paging.cellone-sf.com
Cellular One 10digitphonenumber@mobile.celloneusa.com
Cellular One phonenumber@cellularone.txtmsg.com
Cellular One phonenumber@cellularone.textmsg.com
Cellular One phonenumber@cell1.textmsg.com
Cellular One phonenumber@message.cellone-sf.com
Cellular One phonenumber@sbcemail.com
Cellular South phonenumber@csouth1.com
Central Vermont Communications 10digitpagernumber@cvcpaging.com
CenturyTel phonenumber@messaging.centurytel.net
Chennai RPG Cellular phonenumber@rpgmail.net
Chennai Skycell / Airtel phonenumber@airtelchennai.com
Cincinnati Bell phonenumber@mobile.att.net
Cingular Wireless 10digitphonenumber@mycingular.textmsg.com
Cingular Wireless 10digitphonenumber@mobile.mycingular.com
Cingular Wireless 10digitphonenumber@mobile.mycingular.net
Clearnet phonenumber@msg.clearnet.com
Comcast phonenumber@comcastpcs.textmsg.com
Communication Specialists 7digitpin@pageme.comspeco.net
Communication Specialist Companies pin@pager.comspeco.com
Comviq number@sms.comviq.se
Cook Paging 10digitpagernumber@cookmail.com
Corr Wireless Communications phonenumber@corrwireless.net
Delhi Aritel phonenumber@airtelmail.com
Delhi Hutch phonenumber@delhi.hutch.co.in
Digi-Page / Page Kansas 10digitpagernumber@page.hit.net
Dobson Cellular Systems phonenumber@mobile.dobson.net
Dobson-Alex Wireless / Dobson-Cellular One phonenumber@mobile.cellularone.com
DT T-Mobile phonenumber@t-mobile-sms.de
Edge Wireless phonenumber@sms.edgewireless.com
EMT phonenumber@sms.emt.ee
Escotel phonenumber@escotelmobile.com
Fido phonenumber@fido.ca
GCS Paging pagernumber@webpager.us
Goa BPLMobil phonenumber@bplmobile.com
Golden Telecom phonenumber@sms.goldentele.com
GrayLink / Porta-Phone 10digitpagernumber@epage.porta-phone.com
GTE number@airmessage.net
GTE number@gte.pagegate.net
GTE 10digitphonenumber@messagealert.com
Gujarat Celforce phonenumber@celforce.com
Houston Cellular number@text.houstoncellular.net
Idea Cellular phonenumber@ideacellular.net
Infopage Systems pinnumber@page.infopagesystems.com
Inland Cellular Telephone phonenumber@inlandlink.com
The Indiana Paging Co last4digits@pager.tdspager.com
JSM Tele-Page pinnumber@jsmtel.com
Kerala Escotel phonenumber@escotelmobile.com
Kolkata Airtel phonenumber@airtelkol.com
Kyivstar number@smsmail.lmt.lv
Lauttamus Communication pagernumber@e-page.net
LMT phonenumber@smsmail.lmt.lv
Maharashtra BPL Mobile phonenumber@bplmobile.com
Maharashtra Idea Cellular phonenumber@ideacellular.net
Manitoba Telecom Systems phonenumber@text.mtsmobility.com
MCI Phone phonenumber@mci.com
MCI phonenumber@pagemci.com
Meteor phonenumber@mymeteor.ie
Metrocall 10digitpagernumber@page.metrocall.com
Metrocall 2-way 10digitpagernumber@my2way.com
Metro PCS 10digitphonenumber@mymetropcs.com
Metro PCS 10digitphonenumber@metorpcs.sms.us
Microcell phonenumber@fido.ca
Midwest Wireless phonenumber@clearlydigital.com
MiWorld phonenumber@m1.com.sg
Mobilecom PA 10digitpagernumber@page.mobilcom.net
Mobilecomm number@mobilecomm.net
Mobileone phonenumber@m1.com.sg
Mobilfone phonenumber@page.mobilfone.com
Mobility Bermuda phonenumber@ml.bm
Mobistar Belgium phonenumber@mobistar.be
Mobitel Tanzania phonenumber@sms.co.tz
Mobtel Srbija phonenumber@mobtel.co.yu
Morris Wireless 10digitpagernumber@beepone.net
Motient number@isp.com
Movistar number@correo.movistar.net
Mumbai BPL Mobile phonenumber@bplmobile.com
Mumbai Orange phonenumber@orangemail.co.in
NBTel number@wirefree.informe.ca
Netcom phonenumber@sms.netcom.no
Nextel 10digitphonenumber@messaging.nextel.com
Nextel 10digitphonenumber@page.nextel.com
Nextel 10digitphonenumber@nextel.com.br
NPI Wireless phonenumber@npiwireless.com
Ntelos number@pcs.ntelos.com
Omnipoint number@omnipoint.com
Omnipoint 10digitphonenumber@omnipointpcs.com
One Connect Austria phonenumber@onemail.at
OnlineBeep 10digitphonenumber@onlinebeep.net
Optus Mobile phonenumber@optusmobile.com.au
Orange phonenumber@orange.net
Orange Mumbai phonenumber@orangemail.co.in
Orange - NL / Dutchtone phonenumber@sms.orange.nl
Oskar phonenumber@mujoskar.cz
P&T Luxembourg phonenumber@sms.luxgsm.lu
Pacific Bell phonenumber@pacbellpcs.net
PageMart 7digitpinnumber@pagemart.net
PageMart Advanced /2way 10digitpagernumber@airmessage.net
PageMart Canada 10digitpagernumber@pmcl.net
PageNet Canada phonenumber@pagegate.pagenet.ca
PageOne NorthWest 10digitnumber@page1nw.com
PCS One phonenumber@pcsone.net
Pioneer / Enid Cellular phonenumber@msg.pioneerenidcellular.com
PlusGSM phonenumber@text.plusgsm.pl
Pondicherry BPL Mobile phonenumber@bplmobile.com
Powertel phonenumber@voicestream.net
Price Communications phonenumber@mobilecell1se.com
Primco number@primeco.textmsg.com
Primtel phonenumber@sms.primtel.ru
ProPage 7digitpagernumber@page.propage.net
Public Service Cellular phonenumber@sms.pscel.com
Qwest 10digitphonenumber@qwestmp.com
RAM Page number@ram-page.com
Rogers AT&T Wireless phonenumber@pcs.rogers.com
Rogers Canada 10digitphonenumber@pcs.rogers.com
Safaricom phonenumber@safaricomsms.com
Satelindo GSM phonenumber@satelindogsm.com
Satellink 10digitpagernumber.pageme@satellink.net
SBC Ameritech Paging 10digitpagernumber@paging.acswireless.com
SCS-900 phonenumber@scs-900.ru
SFR France phonenumber@sfr.fr
Skytel Pagers 7digitpinnumber@skytel.com
Skytel Pagers number@email.skytel.com
Simple Freedom phonenumber@text.simplefreedom.net
Smart Telecom phonenumber@mysmart.mymobile.ph
Southern LINC 10digitphonenumber@page.southernlinc.com
Southwestern Bell number@email.swbw.com
Sprint 10digitphonenumber@sprintpaging.com
Sprint PCS 10digitphonenumber@messaging.sprintpcs.com
ST Paging pin@page.stpaging.com
SunCom number@tms.suncom.com
SunCom number@suncom1.com
Sunrise Mobile phonenumber@mysunrise.ch
Sunrise Mobile phonenumber@freesurf.ch
Surewest Communicaitons phonenumber@mobile.surewest.com
Swisscom phonenumber@bluewin.ch
T-Mobile 10digitphonenumber@tmomail.net
T-Mobile 10digitphonenumber@voicestream.net
T-Mobile Austria phonenumber@sms.t-mobile.at
T-Mobile Germany phonenumber@t-d1-sms.de
T-Mobile UK phonenumber@t-mobile.uk.net
Tamil Nadu BPL Mobile phonenumber@bplmobile.com
Tele2 Latvia phonenumber@sms.tele2.lv
Telefonica Movistar phonenumber@movistar.net
Telenor phonenumber@mobilpost.no
Teletouch 10digitpagernumber@pageme.teletouch.com
Telia Denmark phonenumber@gsm1800.telia.dk
Telus phonenumber@msg.telus.com
TIM 10digitphonenumber@timnet.com
Triton phonenumber@tms.suncom.com
TSR Wireless pagernumber@alphame.com
TSR Wireless pagernumber@beep.com
Unicel phonenumber@utext.com
Uraltel phonenumber@sms.uraltel.ru
US Cellular 10digitphonenumber@email.uscc.net
US Cellular 10digitphonenumber@uscc.textmsg.com
US West number@uswestdatamail.com
Uttar Pradesh Escotel phonenumber@escotelmobile.com
Verizon Pagers 10digitpagernumber@myairmail.com
Verizon PCS 10digitphonenumber@vtext.com
Verizon PCS 10digitphonenumber@myvzw.com
Vessotel phonenumber@pager.irkutsk.ru
Virgin Mobile phonenumber@vmobl.com
Vodafone Italy number@sms.vodafone.it
Vodafone Japan phonenumber@c.vodafone.ne.jp
Vodafone Japan phonenumber@h.vodafone.ne.jp
Vodafone Japan phonenumber@t.vodafone.ne.jp
Vodafone Spain phonenumber@vodafone.es
Vodafone UK phonenumber@vodafone.net
VoiceStream / T-Mobile 10digitphonenumber@voicestream.net
WebLink Wiereless pagernumber@airmessage.net
WebLink Wiereless pagernumber@pagemart.net
West Central Wireless phonenumber@sms.wcc.net
Western Wireless phonenumber@cellularonewest.com
Wyndtell number@wyndtell.com

slappyjaw
03-21-2009, 06:30 PM
wow sorry i was miss understood. You already bought the api. Hahaha sry.

slappyjaw
03-21-2009, 06:43 PM
ok sorry for the massive post before Hop this helps!I think this should be right i am some what new to php myself.
Put this in an action page!

<?php
$username = $_POST['Username'];
$password = $_POST['password'];
$sender = $_POST['sender'];
$recipient = $_POST['recipient'];
$messages = $_POST['message'];
$message = urlencode($messages);
header "Location http://sms.anooptechnology.com/pushsms.php?username=$username&password=$password&sender=$sender&to=$recipient&message=$message";
?>
This is your form::

<form id="form1" name="form1" method="post" action="The name of the page with the php!">
<div>
<label>Username:
<input type="text" name="Username" id="Username" />
</label>
<p>
<label>Password:
<input type="text" name="password" id="password" />
</label>
</p>
<p>
<label>Recipient's #:
<input type="text" name="recipient" id="recipient" />
</label>
</p>
<p>
<label>Message:
<input type="text" name="message" id="message" />
</label>
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="Submit" />
</label>
<label>
<input type="submit" name="reset" id="reset" value="Submit" />
</label>
</p>
<p>
<input name="sender" type="hidden" id="hiddenField" value="anoop" />
</p>
</div>
</form>

bazz
03-21-2009, 07:02 PM
In your form 'action' value put


http://sms.anooptechnology.com/pushsms.php?username=$username&password=$password&sender=$sender&to=$recipient&message=$message


hth

bazz

nanoop13
03-21-2009, 11:01 PM
@ Slappy Jaw and bazz
Thanks to you guys.
@ Slappy Jaw
Thanks a lot for the wonderful time you spent for me
The code is working great.But the issue is that the visitor will be able to see my username and password when he fills and sends the contact form because the following page opens with the url in the address bar
http:/ /sms.anooptechnology.com/pushsms.php?username=my_API_username&password=my_API_password
&sender=anoop&to=recipientmobileno&message=Hello.
Is there any way so that the url is executed in the back and the thankyou page opens?

steelaz
03-21-2009, 11:26 PM
After gathering submitted form data, add this line:


$handle = fopen("http://sms.anooptechnology.com/pushsms.php?username=my_API_username&password=my_API_password
&sender=anoop&to=recipientmobileno&message=Hello", "r");

It will visit URL in the background and initiate API call.

slappyjaw
03-22-2009, 03:28 AM
Ok lets see we could try to see if could url encode those aswell? as an alternative but ^ thats probably your best bet. Nice job steelaz.

bazz
03-22-2009, 03:43 AM
I have just re-interpreted your OP.



I wanted to integrate a thankyou message for those who fill up the contact form on my website.


Are you really wanting to send an sms to people to thank them for submitting the form, rather than posting a webpage thank you response? Without knowing your application requirements, I can't be sure but, I would recommend an html (dynamic) response in a web page, where they are at the time of form submission.

bazz

nanoop13
03-22-2009, 09:13 AM
Thanks to all of you for helping me out of this.....
I have duly implemented your codes.......the sms sending is working superb and the visitor is also not able to see my username and password.The visitor is redirected to a thankyou page when he sends the form and a thankyou message is also sent to him sending his login details to his mobile.
Your codes are working beautifully when integated with ajax.
Again Thanks to all of you :thumbsup:!!

raj303
04-07-2009, 09:26 AM
nanoop13,
Finally What code you have written? to send sms without showing password in code?

raj303
04-07-2009, 09:28 AM
Finally What code you have written? to send sms without showing password in code?

gudalguy
04-16-2009, 01:41 PM
can u post what code u used

nanoop13
04-17-2009, 02:17 PM
Make a file sendsms.php and save the following in it

<?php

$mobile = $_POST['FieldData1'] ;
$text = $_POST['FieldData2'] ;
// before filling up these details register at sms.anooptechnology.com .It's free..
$username = "yourusername";//put your own username instead of yourusername
$password = "yourpassword";//put your own password instead of your yourpassword
$message = urlencode($text);
$handle = fopen("http://sms.anooptechnology.com/pushsms.php?username=$username&password=$password&sender=mysenderid&cdmasender=mycdmasenderid&to=$mobile&message=$message","r");
echo "The sms have been sent.Thank you for using our service."
?>

And now make your own html page with the following form embeded into it:


<html>
<head><title>Your Own Sms Sending Website</title>
<script language="Javascript">
function validate()
{
var valid = true;

if (document.formvalidate.FieldData1.value == "")

{
alert("Please enter the mobile no.");
document.formvalidate.FieldData1.focus();
return false;
}
else if (document.formvalidate.FieldData2.value == "")

{
alert("Please enter the text message");
document.formvalidate.FieldData2.focus();
return false;
}
return valid;
}
</script>
</head>
<body>
<form name="formvalidate" method="post" action="sendsms.php">
<table width="448" border="0">
<tr>
<td width="278">Recipients Mobile no.(Don't add 0 or +91)</td>
<td width="160"><input type="text" name="FieldData1" value="" maxlength="10" size="10"></td>
</tr>
<tr>
<td>Your Message</td>
<td><textarea name="FieldData2" cols="20" rows="5"></textarea></td>
</tr>
<tr><td>&nbsp;</td><td><input type="submit" class="btn" value="Send Sms Now!!" name="Submit" onclick="return validate();"></td></tr>
</table>
</form>
</body>
</html>
Source : Anoop Technology (http://anooptechnology.com)

Guys......I will appreciate if you can help in making a code imposing restrictions based on no. of sms sent per day on a particular number and no. of sms's sent from an ip address.Cookie based restriction will also be of great help.

A Do Not call(DNC) feature will also be appreciated where user may enter his no. and sms will not be sent to him next time.

Thanks and regards,
N Anoop

slappyjaw
08-13-2009, 08:09 PM
I think your best bet would be to do they extra features with a mysql database and cookies. The do not call feature would be best done with mysql. do you have your own web server?

haradeep
08-13-2009, 08:26 PM
Hi,

I know this code.

Can any one help with the forum below.
http://codingforums.com/showthread.php?t=174476

Thanks,
Haradeep



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum