Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Get Provider From Cell Number

Posted on 2014-01-05
3
Medium Priority
?
433 Views
Last Modified: 2014-01-06
I want to sms race results to participants if they provide a cell phone number.  I know that the cell phone needs to be tied to a provider in order to send it a text message.  Is there a way to get the provider from the number so the athlete doesn't have to provide that?
0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Assisted Solution

by:R. Andrew Koffron
R. Andrew Koffron earned 400 total points
ID: 39758437
with all the number porting the last several years I'd think it'd be very tough, and maybe you could get probably "x,y,z provider" type info but even land lines can be ported with a bit of finagling
0
 
LVL 12

Assisted Solution

by:ryan80
ryan80 earned 200 total points
ID: 39758496
You could reach out to Neustar to see if they would give you that info, but I doubt it. They maintain the national database with that info.

You could also use a sms of course at a cost.
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1400 total points
ID: 39758559
While you can send text via an email if you know the carrier http:Q_27955479.html#a3865569, you can do a lot more by using Twillio's api http://www.twilio.com/sms

The cost is $1 per month for a phone number and $0.075 to send out an sms (100 messages would cost you 75 cents).  All you need is the number.  It will not matter what the carrier is or if they use google voice.  You can also use the number to receive info and interact with the db.

The api is easy although they don't show classic asp http://www.twilio.com/docs/api/rest/sms
php
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library
 
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "AC5ef8732a3c49700934481addd5ce1659"; 
$token = "{{ auth_token }}"; 
$client = new Services_Twilio($sid, $token);
 
// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$sms = $client->account->sms_messages->get("SM800f449d0399ed014aae2bcc0cc2f2ec");
echo $sms->body;

Open in new window

classic asp
<%
		thePhone=' could be hard coded, request.form("something") or a rs("something")
		theTextMessage=' could be hard coded, request.form("something") or a rs("something")
	    accountSid = "abcxyz"
		authToken = "abcxyz"

		' setup the URL
		baseUrl = "https://api.twilio.com"
		smsUrl = baseUrl & "/2010-04-01/Accounts/" & accountSid & "/SMS/Messages"

		' setup the request and authorization
		Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
		http.open "POST", smsUrl, False, accountSid, authToken
		http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

		' call parameters
		From = "+15555555555" ' Use +1 and your phone number t
		recipient = "+1"&thePhone 'the phone number to send 

		      
		body = "Hi, I am your text message"&theTextMessage

		postData = "From=" & Server.URLEncode(From)
		postData = postData & "&To=" & Server.URLEncode(recipient)
		postData = postData & "&Body=" & Server.URLEncode(body) 

		' send the POST data
		http.send postData

		' optionally write out the response if you need to check if it worked
		'Response.Write http.responseText

		' clean up
		Set http = Nothing
		
		end if

%>

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do we know about Legacy Video Conferencing? - Full IT support needed! - Complicated systems at outrageous prices! - Intense training required! Highfive believes we need to embrace a new alternative.
Every business owner understands the significance of online customer reviews and the impact it can have on sales and revenues. With technology advancing at such a rapid pace, getting online reviews has never been easier, especially when many regions…
The goal of the tutorial is to teach the user how to instant message and make a video call in Skype.
Video by: syed
The goal of the tutorial is to teach the what Skype is and how to use it.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question