免费发短信(仅限美国海内)How to Send Free Text Messages Using PHP
测试DEMO
?
I am currently working on a large project and part of the project is to send simple text message notices using PHP.? Our client had looked into a number of expensive services to send simple SMS messages but most were cost prohibitive for a start-up venture.
As usual, I was not satisfied paying for something that I should be able to do on my own. So I started thinking about how the messaging systems worked and realized that we could just use the carriers built in email addresses for MMS messaging.? This is a great, cost effective method for sending text messages but it does require that you know the user’s carrier for the message to be successfully delivered.? In our case, we are able to ask for that in the web form which we are using to collect the user’s phone number but it may not work for every application.?
?
Basically the solution is to send an email using the built in mail function in PHP or any common method of sending email.? The email address you would send to would be the 10 digit mobile number followed by the carriers specific email address. (A list is included below)
?
Email addresses for the primary U.S. based cell phone carriers:
Alltel = [email protected]
AT&T = [email protected] or [email protected]
Boost Mobile = [email protected]
Centennial Wireless = [email protected]
Einstein PCS = [email protected]
Nextel = [email protected]
Sprint = [email protected] or [email protected]
T-Mobile = [email protected]
US Cellular = [email protected]
Verizon Wireless = [email protected]
Virgin Mobile = [email protected]
?
The simple PHP code to send the email:
//SUBJECT AND BODY OF EMAIL SHOULD BE LESS THAN 160 CHARACTERS TOTAL$subject = "Text Message Subject";$message = "Text Message Content"; //SENDS TEXT MESSAGE TO 503-869-4212mail("[email protected]",$subject,$message,"From: [email protected]");
?
?
原文:http://www.stemkoski.com/sending-text-messages-using-php-for-free/
更多carrier:
http://www.sensiblesoftware.com/weblog/2011/02/28/cell-phone-email-addresses/
http://networking.ringofsaturn.com/Telecommunications/mobile-phone-emails.php
?
测试DEMO
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
上一篇: Redis主从遇到的两个问题解决
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论