Have you ever written a PHP call SMS interface?

Source: Internet
Author: User
Everyone who wrote PHP call SMS interface?
Everyone who wrote the PHP call SMS interface, there is the best source, there is a suitable SMS interface also recommended, requirements: 24 hours to send, with the hair, do the verification code.

------Solution--------------------
The core code is as follows:

function Rstr ($STR) {
$s =intval (substr ($str, 0, 1));
if ($s ==1)
$error = ' Send success on behalf ';
else{
$b =intval (substr ($str, 0,2));
Switch ($b) {
Case-1: $error = ' cell phone number is incorrect ';
Case-2: $error = ' All parameters cannot be empty except time ';
Case-3: $error = ' username password is incorrect ';
Case-4: $error = ' platform does not exist ';
Case-5: $error = ' Customer SMS number is 0 ';
Case-6: $error = ' customer account balance is less than the number of bars to send ';
Case-7: $error = ' cannot exceed 70 words ';
Case-8: $error = ' illegal SMS content ';
Case-9: $error = ' unknown system failure ';
CASE-10: $error = ' network error ';
Default: $error =false;
}
}
return $error;
}

function Sendnote ($mobtel, $msg) {
$string = file_get_contents ("http://jiekou.56dxw.com/sms/httpinterface.aspx?comid=60&username=test1& Userpwd=123&handtel= $mobtel &sendcontent= $msg &
sendtime=&smsnumber=0739 ");
Return Rstr ($string);
}
$msg = ' content limit is 70 words, ';
$msg =mb_convert_encoding ($msg, ' gb2312 ', ' utf-8 ');
Echo Sendnote (' Mobile phone number ', $msg);

56 SMS Interface Document download address:

Http://www.56dxw.com/Interface/duanxinjiekouxiazai.html

PHP Call HTTP SMS interface Source: http://www.56dxw.com/Interface/202.html

SMS interface Please refer to: http://www.56dxw.com
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.