downloadqrcode.php 963 Bytes
<?php
// $filename = "http://mmbiz.qpic.cn/mmbiz_jpg/iasPTenicGpJZWCW2Nib86icNAPmEAezmLgTua3cr8XO9iaHmR3CoiboY5GZ4CxpRLYETI0JlMDhItfmoDNVlNbvkibng/0";//
//图片地址,可以绝对地址也可以相对地址
// $qrcode_url=$_GET["qrcode_url"];
// $name=$_GET["name"];
//http://open.weixin.qq.com/qr/code/?username=gh_75da794dc001
// $filename = "http://open.weixin.qq.com/qr/code/?username=gh_75da794dc001";
// header("Content-Type: application/force-download");
// header('Content-Disposition: attachment; filename="'.$filename.'.jpg"');
// $img = file_get_contents($filename);
//echo $img;
//<?php
$qrcode_url=$_GET["qrcode_url"];
$name=$_GET["name"];
//$filename = "http://open.weixin.qq.com/qr/code/?username=gh_75da794dc001";//图片地址,可以绝对地址也可以相对地址
header("Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$name.'.jpg"');
$img = file_get_contents($qrcode_url);
echo $img;
?>

?>