PHP 多圖合成加二維碼

$itemid = $_GET[‘num_iid’];
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkItemInfoGetRequest;
$req->setFields(“num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick”);
$req->setPlatform(“1”);
req>setNumIids("".req->setNumIids("".itemid."");
$resp = c>execute(c->execute(req);
resp=jsondecode(jsonencode(resp =json_decode(json_encode(resp), true);
$detail = $resp[‘results’][‘n_tbk_item’];

$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkCouponGetRequest;
req>setMe("".req->setMe(""._GET[‘e’]."");
$resp = c>execute(c->execute(req);
resp=jsondecode(jsonencode(resp =json_decode(json_encode(resp), true);
$quan = $resp[‘data’];

if($_G[‘charset’] !== ‘utf-8’){
other=autocharset(other = auto_charset(other);
detail=autocharset(detail = auto_charset(detail);
}

$detail = $detail[‘0’];

$src = ‘source/plugin/zhuzhu_taobao/static/image/’;

$font = “source/plugin/zhuzhu_taobao/static/font/fzltcxhjw.ttf”;
$arial = “source/plugin/zhuzhu_taobao/static/font/arialbd.ttf”;

$title = $detail[‘title’];
$quan = $quan[‘coupon_amount’];
$value = $detail[‘zk_final_price’];
$price = valuevalue-quan;

if(strlen($quan) == ‘1’){
KaTeX parse error: Double superscript at position 11: quan = ' '̲.quan;
}elseif(strlen($quan) == ‘2’){
KaTeX parse error: Double superscript at position 10: quan = ' '̲.quan;
}

if(substr($detail[‘pict_url’], 0, 5) == ‘https’) {
goods=http.ltrim(goods = 'http'.ltrim(detail[‘pict_url’], ‘https’);
} else {
$goods = $detail[‘pict_url’];
}

require_once libfile(‘function/code’, ‘plugin/zhuzhu_taobao’);
$url = G[siteurl]."/plugin.php?id=zhuzhutaobao_G['siteurl']."/plugin.php?id=zhuzhu_taobao%26mod=jump_url%26num_iid=".itemid."%26e=".str_replace(" “,”+", $_GET[‘e’]);

KaTeX parse error: Expected 'EOF', got '&' at position 65: …php?format=json&̲url=".url);
shorturl=jsondecode(short_url = json_decode(short_url,true);
$short_url = $short_url[‘url’];

$filename = ‘source/plugin/zhuzhu_taobao/static/QRcode.png’;
QR=QRcode::png(QR = QRcode::png(short_url,$filename,‘L’, ‘7.3’, ‘0’);

goods=imagecreatefromjpeg(goods = imagecreatefromjpeg(goods);
qcode=imagecreatefrompng(qcode = imagecreatefrompng(filename);
qimg=imagecreatefromjpeg(q_img = imagecreatefromjpeg(src.“img_quan.jpg”);
qkuang=imagecreatefromjpeg(q_kuang = imagecreatefromjpeg(src.“img_kuang.jpg”);
qsheng=imagecreatefromjpeg(q_sheng = imagecreatefromjpeg(src.“img_sheng.jpg”);

if($_G[‘charset’] !== ‘utf-8’){
title=diconv(title = diconv(title, “GB2312”, “UTF-8”);
}

$title = autowrap(12, 0, $font, $title, 250);

$detail = imagecreatetruecolor(820, 1100);
color=imagecolorAllocate(color = imagecolorAllocate(detail,255,255,255);
imagefill(detail,0,0,detail ,0 ,0 ,color);

black=imagecolorallocate(black = imagecolorallocate(detail, 0, 0, 0);
white=imagecolorallocate(white = imagecolorallocate(detail, 255,255,255);

imagettftext($detail, 24, 0, 20, 870, $black, $font, title);imagecopymerge(title); imagecopymerge(detail, goods,10,10,0,0,800,800,100);imagecopymerge(goods, 10, 10, 0, 0, 800, 800, 100); imagecopymerge(detail, qsheng,40,960,0,0,450,120,100);imagettftext(q_sheng, 40, 960, 0, 0, 450, 120, 100); imagettftext(detail, 44, 0, 285, 1028, $white, $arial, price);imagettftext(price); imagettftext(detail, 28, 0, 108, 1045, $white, $arial, quan);imagettftext(quan); imagettftext(detail, 25, 0, 295, 1063, imagecolorallocate($detail, 255,255,255), $font, value);imagettftext(value); imagettftext(detail, 25, 0, 296, 1063, imagecolorallocate($detail, 255,255,255), $font, value);imagecopymerge(value); imagecopymerge(detail, qkuang,580,840,0,0,210,260,100);imagecopymerge(q_kuang, 580, 840, 0, 0, 210, 260, 100); imagecopymerge(detail, $qcode, 594, 854, 0, 0, 182, 182, 100);

header(“Content-type: image/jpeg”);
imagejpeg($detail);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章