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