12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- require_once("../../autoload.php");
- use \Qiniu\Auth;
- $ak="xxxx";
- $sk="xxxx";
- $auth = new Auth($ak, $sk);
- $client = new Qiniu\Sms\Sms($auth);
- $template_id="1131792074274775040";
- $mobiles=array("18011111111","18011111111");
- $code = array('code' => 'code' );
- try {
-
- $resp = $client->sendMessage($template_id, $mobiles, $code);
- print_r($resp);
- } catch (\Exception $e) {
- echo "Error:", $e, "\n";
- }exit;
- $name="tstest001";
- $template="tesy001 ${code}";
- $type="notification";
- $description="tstest001";
- $signature_id="1131464448834277376";
- $id="1131810682442883072";
- try {
-
- $resp = $client->createTemplate($name, $template, $type, $description, $signature_id);
- print_r($resp);
-
- $resp = $client->queryTemplate();
- print_r($resp);
-
- $resp = $client->updateTemplate($id, $name, $template, $description, $signature_id);
- print_r($resp);
-
- $resp = $client->deleteTemplate($id);
- print_r($resp);
- } catch (\Exception $e) {
- echo "Error:", $e, "\n";
- }
- $signature = 'lfxlive2';
- $source = 'enterprises_and_institutions';
- $pic="/Users/Desktop/sss.jpg";
- $audit_status="passed";
- $page=1;
- $page_size=1;
- $id="1131464448834277376";
- try {
-
- $resp = $client->createSignature($signature, $source, $pic);
- print_r($resp);
-
- $resp = $client->checkSignature($audit_status);
-
- $resp = $client->updateSignature($id, $signature, $source, $pic);
- print_r($resp);
-
- $resp = $client->deleteSignature($id);
- print_r($resp);
- } catch (\Exception $e) {
- echo "Error:", $e, "\n";
- }
|