PHP線上產生二維碼

來源:互聯網
上載者:User

PHP線上產生二維碼
利用google線上產生二維碼的api線上產生二維碼

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>二維碼產生-www.php100.com</title><SCRIPT LANGUAGE=JavaScript>function post(){if(document.getElementById('content').value==''){alert('內容不可為空!');document.getElementById('content').focus();return false;}if(ckregdatapost()==false){return false;}}</SCRIPT> </head><body><style>body{text-align:center;background:#f5f5f5;line-height:22px;font-size:14px;color:#888;}.newcrop{margin:10;}.er{width:700px;margin:0px auto;border:1px solid gray}span{background:#645;color:#fff}body form {text-align:center;padding: 3px 6px 3px 6px;}input.txt{color: #00008B;background-color: #ADD8E6;border: 1px inset #00008B;width: 200px;}input.btn {color: #00008B;background-color: #ADD8E6;border: 1px outset #00008B;padding: 2px 4px 2px 4px;}input.smallInput{border:1 solid black;FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal}</style><body class="newcrop"><div class="er"><?php$content=$_GET['content'];$width=$_GET['width']?$_GET['width']:300;$height=$_GET['height']?$_GET['height']:300;if($content){echo "你輸入的文字是: <span>$content </span><BR />";echo "你選擇的寬度是: <span>$width </span><BR />";echo "你選擇的高度是: <span>$height </span><BR /> ";echo "產生的二維碼映像是:<BR /> ";$wen = urlencode($content);   echo "<img id=qrcode_img src=https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen} /><br />   圖片地址:<a href='https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen}' target='_blank'>https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen}</a><br />複製發給你的朋友。 <a href='javascript:history.go(-1);'>返回上一頁</a>";}else{?><form action="" method="get" onsubmit="return post();"><h1>二維碼產生工具</h1>  <p>width:<select name="width"><option value="100">100</option><option value="200">200</option><option value="300" Selected>300</option><option value="400">400</option><option value="500">500</option></select>height: <select name="height"><option value="100">100</option><option value="200">200</option><option value="300" Selected>300</option><option value="400">400</option><option value="500">500</option></select></p>輸入網址或者文字:<br /><textarea rows="5" cols="30" name="content" id="content" ></textarea><br /><br /><input type="submit" value="產生圖片"  />    <INPUT TYPE="RESET" VALUE="重新填寫"><br /> </form><? }?><div></body></html>


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.