<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here'; $text = 'https://www.jisuapi.com/api/sms';//utf8 $bgcolor = 'FFFFFF'; $fgcolor = '000000'; $oxlevel = 'L'; $width = 3; $margin = 0; $tempid = ''; $logo = 'https://www.jisuapi.com/static/images/icon/qrcode.png'; $url = "https://api.jisuapi.com/qrcode/generate?appkey=$appkey&text=$text&bgcolor=$bgcolor&fgcolor=$fgcolor&width=$width&margin=$margin&logo=$logo&oxlevel=$oxlevel&tempid=$tempid"; $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']; $content = $result['qrcode']; //file_put_contents('qrcode.png', base64_decode($content)); echo "";