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

Use php to generate QR code electronic business cards

*文
Release: 2023-03-18 09:58:01
Original
2716 people have browsed it

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);

?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template