Home  >  Article  >  Backend Development  >  Use php to generate QR code electronic business cards

Use php to generate QR code electronic business cards

*文
*文Original
2017-12-23 15:42:452669browse

Today, when QR codes are widely used, how to make yourself a QR code electronic business card? This article will guide you to use PHP to generate your own QR code electronic business card.

Without further ado, let’s get straight to the code. (phpqrcode used)

<?php
include "phpqrcode/qrlib.php";

$content=&#39;BEGIN:VCARD&#39;."\n";
$content.=&#39;VERSION:2.1&#39;."\n";
$content.=&#39;N:张&#39;."\n";
$content.=&#39;FN:三&#39;."\n";
$content.=&#39;ORG:**公司&#39;."\n";
$content.=&#39;TEL;WORK;VOICE:18868881111&#39;."\n";
$content.=&#39;TEL;HOME;VOICE:18868881112&#39;."\n";
$content.=&#39;TEL;TYPE=cell:18868881113&#39;."\n";
$content.=&#39;ADR;HOME:;;德外大街10号;西城区;北京市;400000;中国&#39;."\n";
$content.=&#39;EMAIL:hr@imooc.com&#39;."\n";
$content.=&#39;URL:http://www.imooc.com&#39;."\n";
$content.=&#39;END:VCARD&#39;."\n";

QRcode::png($content);

?>

Related recommendations:

##php QR code generation

PHP generates an example of QR code with LOGO image based on phpqrcode

##Using Thinkphp3.2 combined with phpqrcode to generate QR code

The above is the detailed content of Use php to generate QR code electronic business cards. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn