如何使用PHP和一个简单的调用一样简单的邮件(),TextMagic提供了一个API,用于各种语言(Java、PHP、Perl、Python、Ruby等等),很容易配置。 无 几个月前我写了一个令人震惊的公开发短信如何使用PHP和一个简单的调用一样简单的邮件()。使用邮件方法唯一的缺点是,
如何使用PHP和一个简单的调用一样简单的邮件(),TextMagic提供了一个API,用于各种语言(Java、PHP、Perl、Python、Ruby等等),很容易配置。
几个月前我写了一个令人震惊的公开发短信如何使用PHP和一个简单的调用一样简单的邮件()。使用邮件方法唯一的缺点是,你需要知道承运人对于一个给定的电话号码——一个丢脸的问题要问任何你打算做广告。幸运的是有一个简单有效的web服务可以称为TextMagic。TextMagic提供了一个API,用于各种语言(Java、PHP、Perl、Python、Ruby等等),很容易配置。 PHP 一旦你TextMagic帐户和你下载提供的API辅助TextMagic,所有您需要做的是创建一个自定义代码来发送你的短信: // Include the TextMagic PHP lib require('textmagic-sms-api-php/TextMagicAPI.php'); // Set the username and password information $username = 'myusername'; $password = 'mypassword'; // Create a new instance of TM $router = new TextMagicAPI(array( 'username' => $username, 'password' => $password )); // Send a text message to '999-123-4567' $result = $router->send('Wake up!', array(9991234567), true); // result: Result is: Array ( [messages] => Array ( [19896128] => 9991234567 ) [sent_text] => Wake up! [parts_count] => 1 ) 复制代码 send调用的结果是一个数组的信息发送你的信息。检查发送状态之后,你只需要调用messageStatus方法: // Get the message send status by received ID $result = $router->messageStatus(array(19896128)); // result: Array ( [19896128] => Array ( [text] => Wake up! [status] => d [created_time] => 1325261093 [reply_number] => 447624800500 [completed_time] => 1325261120 [credits_cost] => 1 ) ) 复制代码 如果你想检查一个电话号码的状态和信贷成本发送短信的号码,你可以打电话checkNumber: // Get the message number information $result = $router->checkNumber(array(9991234567)); // result: Array ( [16083359316] => Array ( [price] => 1 [country] => US ) ) 复制代码 TextMagic真是一个了不起的服务。账户很容易创建、API很简单,和最重要的是,不需要知道收件人的载体! 来源:PHP站中文网

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
