I am trying to create a PHP form from which users can send a text message to their friend's phone. To do that, I need my form to include fields for entering both their friend's phone number (into a text box) and service provider (choose from a dropdown box, each which is associated with an @email.com address in the code), and then I need to tell the form to combine the two fields into an email address (ie, if friend's phone number is 9998887777, and service provider is Verizon, the form would be sent to ). Can anyone advise on how to do this? I am not very experienced in PHP, so I may be hard to teach... If someone could provide the code needed, that would be great!
i think the best way to do this is by using Curl module in php (needs to be installed and running) with this you can connect to a site and send information to specific text boxes and so forth and collect perticular results from the "vtext" site look it up mate
$5 via PayPal to anyone to do this for me (must work how I want it to work). You may contact me on Yahoo at my username if interested.
This has already been done, me and a friend made the site www.txtmsgsender.com Anyhow, this is super easy. All you need is a list of @emails for each of the service providers, then append them. This code below assumes that a phone number named "phone" is being posted and that the extension for the provider is provided in "emailext". It's not really complete but it should guide you in the right direction. Here's a form: <form action="send.php" method="post"> Phone Number: <br /> <input type="text" name="phone" maxlength="12" /><br /><br /> Provider: <br /> do this yourself, I'm not going to do this for you. <br /><br/> <input type="submit" value="Submit" /> Code (markup): <?php $phone = str_replace("-", "", $_POST['phone']); //retrieves the posted data and replaces heiphens $ext = strpos("@", strip_tags($_POST['emailext'])) !== false ? strip_tags($_POST['emailext']) : "@" . strip_tags($_POST['emailext']); //retrieves the posted data, strips tags, and adds "@" if it's omitted. if (strlen($phone)!=10||is_numeric($phone)==false) { die ("You must enter a valid phone number!"); //replace this with your own error procedure } else { $email = "{$phone}{emailext}"; //the email echo "Your email is {$email}."; } ?> Code (markup): Here's a list of providers, it might be of use to you: 3River Wireless|@sms.3rivers.net AT&T Wireless|@mobile.att.net Andhra Pradesh Airtel|@airtelap.com Andhra Pradesh Idea Cellular|@ideacellular.net Alltel PCS|@message.alltel.com Alltel|@alltelmessage.com Arch Wireless|@archwireless.net BeeLine GSM|@sms.beemail.ru BeeLine (Moscow)|@sms.gate.ru Bell Canada|@txt.bellmobility.ca Bell Atlantic|@message.bam.com Bell South|@sms.bellsouth.com Bite GSM (Lithuania)|@sms.bite.lt Bluegrass Cellular|@sms.bluecell.com BPL mobile|@bplmobile.com Celcom (Malaysia)|@sms.celcom.com.my Cellular One|@mobile.celloneusa.com Cellular One East Cost|@phone.cellone.net Cellular One South West|@swmsg.com Cellular One|@mobile.celloneusa.com Cellular South|@csouth1.com Cellular One|@message.cellone-sf.com Cellular One|@sbcemail.com CenturyTel|@messaging.centurytel.net Cingular|@mobile.mycingular.net Cingular Wireless|@mobile.mycingular.net Clearnet|@msg.clearnet.com Comcast|@comcastpcs.textmsg.com CZECH EuroTel|@sms.eurotel.cz CZECH Paegas|@sms.paegas.cz Chennai Skycell / Airtel|@airtelchennai.com Chennai RPG Cellular|@rpgmail.net Comviq GSM Sweden|@sms.comviq.se Corr Wireless Communications|@corrwireless.net D1 De TeMobil|@t-d1-sms.de D2 Mannesmann Mobilefunk|@d2-message.de DT T-Mobile|@t-mobile-sms.de Delhi Airtel|@airtelmail.com Delhi Hutch|@delhi.hutch.co.in Dobson-Cellular One|@mobile.cellularone.com Dobson Cellular Systems|@mobile.dobson.net Edge Wireless|@sms.edgewireless.com E-Plus (Germany)|@eplus.de EMT|@sms.emt.ee Eurotel (Czech Republic)|@sms.eurotel.cz Europolitan Sweden|@europolitan.se Escotel|@escotelmobile.com Estonia EMT|@sms-m.emt.ee Estonia RLE|@rle.ee Estonia Q GSM|@qgsm.ee Estonia Mobile Telephone|@sms.emt.ee Fido|@fido.ca Georgea geocell|@sms.ge Goa BPLMobil|@bplmobile.com Golden Telecom|@sms.goldentele.com Golden Telecom (Kiev, Ukraine only)|@sms.gt.kiev.ua GTE|@messagealert.com Gujarat Idea|@ideacellular.net Gujarat Airtel|@airtelmail.com Gujarat Celforce / Fascel|@celforce.com Goa Airtel|@airtelmail.com Goa BPLMobil|@bplmobile.com Goa Idea Cellular|@ideacellular.net Haryana Airtel|@airtelmail.com Haryana Escotel|@escotelmobile.com Himachal Pradesh Airtel|@airtelmail.com Houston Cellular|@text.houstoncellular.net Hungary Pannon GSM|@sms.pgsm.hu Idea Cellular|@ideacellular.net Inland Cellular Telephone|@inlandlink.com Israel Orange IL|@shiny.co.il Karnataka Airtel|@airtelkk.com Kerala Airtel|@airtelmail.com Kerala Escotel|@escotelmobile.com Kerala BPL Mobile|@bplmobile.com Kyivstar (Kiev Ukraine only)|@sms.kyivstar.net Kyivstar|@smsmail.lmt.lv Kolkata Airtel|@airtelkol.com Latvia Baltcom GSM|@sms.baltcom.lv Latvia TELE2|@sms.tele2.lv LMT|@smsmail.lmt.lv Madhya Pradesh Airtel|@airtelmail.com Maharashtra Idea Cellular|@ideacellular.net MCI Phone|@mci.com Meteor|@mymeteor.ie Metro PCS|@mymetropcs.com Metro PCS|@metorpcs.sms.us MiWorld|@m1.com.sg Mobileone|@m1.com.sg Mobilecomm|@mobilecomm.net Mobtel Srbija|@mobtel.co.yu Mobitel (Tanazania)|@sms.co.tz Mobistar Belgium|@mobistar.be Mobility Bermuda|@ml.bm Movistar (Spain)|@correo.movistar.net Maharashtra Airtel|@airtelmail.com Maharashtra BPL Mobile|@bplmobile.com Manitoba Telecom Systems|@text.mtsmobility.com Mumbai Orange|@orangemail.co.in MTC|@sms.mts.ru Mumbai BPL Mobile|@bplmobile.com MTN (South Africa only )|@sms.co.za MiWorld ( Singapore)|@m1.com.sg NBTel|@wirefree.informe.ca Netcom GSM (Norway)|@sms.netcom.no Nextel|@messaging.nextel.com Nextel|@nextel.com.br NPI Wireless|@npiwireless.com Ntelos| One Connect Austria|@onemail.at OnlineBeep|@onlinebeep.net Omnipoint|@omnipointpcs.com Optimus (Portugal)|@sms.optimus.pt Optus Mobile|@optusmobile.com.au Orange|NL / Dutchtone|@sms.orange.nl Orange|@orange.net Oskar|@mujoskar.cz Pacific Bell|@pacbellpcs.net PCS One|@pcsone.net Pioneer / Enid Cellular|@msg.pioneerenidcellular.com PlusGSM (Poland only)|@text.plusgsm.pl P&T Luxembourg|@sms.luxgsm.lu Poland PLUS GSM|@text.plusgsm.pl Pondicherry BPL Mobile|@bplmobile.com Primco|@primeco@textmsg.com Primtel|@sms.primtel.ru Public Service Cellular|@sms.pscel.com Punjab Airtel|@airtelmail.com Qwest|@qwestmp.com Riga LMT|@smsmail.lmt.lv Rogers AT&T Wireless|@pcs.rogers.com Rogers Canada|@rci.rogers.com Safaricom|@safaricomsms.com Satelindo GSM|@satelindogsm.com Simobile (Slovenia)|@simobil.net SCS-900|@scs-900.ru Sunrise Mobile|@mysunrise.ch Sunrise Mobile|@freesurf.ch SFR France|@sfr.fr Southwestern Bell|@email.swbw.com Sonofon Denmark|@note.sonofon.dk Sprint PCS|@messaging.sprintpcs.com Sprint|@sprintpaging.com Swisscom|@bluewin.ch Swisscom|@bluemail.ch Telecom Italia Mobile (Italy)|@posta.tim.it Telenor Mobil Norway|@mobilpost.com Telecel (Portugal)|@sms.telecel.pt Tele2|sms.tele2.lv Tele Danmark Mobil|@sms.tdk.dk Telus|@msg.telus.com Telenor|@mobilpost.no Telia Denmark|@gsm1800.telia.dk TIM|@timnet.com TMN (Portugal)|@mail.tmn.pt T-Mobile Austria|@sms.t-mobile.at T-Mobile Germany|@t-d1-sms.de T-Mobile UK|@t-mobile.uk.net T-Mobile USA|@tmomail.net Triton|@tms.suncom.com Tamil Nadu Aircel|@airsms.com Tamil Nadu BPL Mobile|@bplmobile.com UMC GSM|@sms.umc.com.ua Unicel|@utext.com Uraltel|@sms.uraltel.ru US Cellular|@email.uscc.net US West|@uswestdatamail.com Uttar Pradesh (West) Escotel|@escotelmobile.com Verizon|@vtext.com Verizon PCS|@myvzw.com Vodafone Omnitel (Italy)|@vizzavi.it Vodafone Italy|@sms.vodafone.it Vodafone Japan|@c.vodafone.ne.jp Vodafone Spain|@vodafone.es Vodafone UK|@vodafone.net West Central Wireless|@sms.wcc.net Western Wireless|@cellularonewest.com
Thanks! Anyone want to piece this together into a complete working form as needed? I've got $5 for the person to do such, assuming it's what I am looking for. Otherwise I'll take a stab at this myself once I have a bit of free time.