At present , SMS captcha is widely used , But to access and debug quickly and efficiently , It's very time-consuming , There are too many SMS service providers in the market , It takes a lot of time to make a comparative study of each family , Let's share a very stable SMS interface I've used as an example :
`
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://vip.veesing.com/smsAp...');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append(new http\QueryString(array(
'appId' => '41KYR0EB**',
'appKey' => 'IIWCKKSR7NOQ**',
'phone' => '1561894**',
'templateId' => '1043',
'variables' => '1234')));$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
`
That's all PHP - pecl_http Example of access SMS verification code , Hope to share the above , It can improve your work efficiency , Copy, paste, take away !