PHP Call call Textmagic API send SMS _php tutorial

Source: Internet
Author: User
PHP implementation of the online text messaging, the need for third-party APIs, the following code is called the Textmagic API to achieve the ability to send SMS:

View SOURCEPRINT?01

02//Introducing textmagic PHP Library files

03require (' textmagic-sms-api-php/textmagicapi.php ');

04$username = ' MyUserName ';

05$password = ' MyPassword ';

06$router = new Textmagicapi (Array (

"Username" and $username,

' Password ' and $password

09));

10//send a message to ' 222-345-5678 '

11$result = $router->send (' Wake up! ', Array (2223455678), true);

12//Results (Official information): Array ([messages] = = Array ([19896128] = 9991234567) [Sent_text] = Wake up! [Parts_count] = 1)

13?>

If there is no Textmagic API class library can be downloaded here: Textmagic-sms-api PHP send SMS Module class

http://www.bkjia.com/PHPjc/755618.html www.bkjia.com true http://www.bkjia.com/PHPjc/755618.html techarticle PHP Implementation of online text messaging, need to use third-party API, the following code is called the Textmagic API to implement the function of sending SMS: View sourceprint?01 02//introduced textmagic PHP library file ...

  • 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.