Home >Backend Development >PHP Tutorial >PHP study notes---PHP generates QR code business cards and adds the business card content to contacts_PHP tutorial

PHP study notes---PHP generates QR code business cards and adds the business card content to contacts_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 10:32:201047browse

----------------------------------------
1. After testing, the QR code is generated and the screen that appears after scanning
a. For example, information scanned using QQ can be directly added to contacts. This should be processed by QQ after scanning the QR code,
b. If used to scan, the scanned content will only contain the corresponding text information without processing, and the contact software of the mobile phone system cannot be called
2.Business card code:
Generate business card with php:
$vname = 'test';
$vtel = '13800000000';
generateQRfromGoogle($vname,$vtel);

function generateQRfromGoogle($vname,$vtel,$widhtHeight ='150',$EC_level='L',$margin='0')
{
if($vname&&$vtel){
$chl = "BEGIN:VCARDnVERSION:3.0". //vcard header information
"nFN:$vname".
"nTEL:$vtel".
"nEND:VCARD"; //vcard tail information
echo 'QR code';
}
}
?>
PHP generates URL QR code:

$url = "http://www.google.com.hk";
generateQRfromGoogle($url);

function generateQRfromGoogle($chl,$widhtHeight ='150',$EC_level='L',$margin='0')
{
echo 'QR code';
}
?>
-------------------------------------------------- -----------------------

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/755790.htmlTechArticle------------------------ ------------ 1. After testing, the QR code is generated and the screen that appears after scanning is a. For example, the information scanned using QQ can be directly added to the contacts. This should be ...
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
Previous article:PHP XML DOM_PHP TutorialNext article:PHP XML DOM_PHP Tutorial