首页 短信 短信示例代码 获取短信模板详情[PHP]

获取短信模板详情示例代码[PHP]

作者: 阅读数:1676 上传时间:2018-04-10

获取短信模板详情

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$templateid = 1;//模板ID

$url = "https://api.jisuapi.com/sms/templatedetail?appkey=$appkey&templateid=$templateid";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
$result = $jsonarr['result'];
echo $result['name'].' '.$result['content'].' '.$result['templateid'].' '.$result['status'].' '.$result['ismarket'].' '.$result['failreason'].' '.$result['addtime'].'
';