Home >Backend Development >PHP Tutorial >php学习笔记-PHP生成二维码名信片,并把名片内容添加到联系人中

php学习笔记-PHP生成二维码名信片,并把名片内容添加到联系人中

WBOY
WBOYOriginal
2016-06-13 11:52:201060browse

php学习笔记---PHP生成二维码名片,并把名片内容添加到联系人中

------------------------------------
1.测试了一下,二维码生成,扫描以后出现的画面
  a.比如用qq的话扫描的信息,可以直接添加到联系人中去,这应该是qq扫描二维码之后进行了处理,
  b.如果用来往扫描,那么扫描出来的内容就只有对应的文本信息,没有进行处理,不能调用手机系统的联系人软件
2.名片代码:
php生成名片:
$vname = 'test'; 
$vtel = '13800000000'; 
generateQRfromGoogle($vname,$vtel);

function generateQRfromGoogle($vname,$vtel,$widhtHeight ='150',$EC_level='L',$margin='0')
{
    if($vname&&$vtel){ 
       $chl = "BEGIN:VCARD\nVERSION:3.0". //vcard头信息 
       "\nFN:$vname". 
       "\nTEL:$vtel". 
       "\nEND:VCARD"; //vcard尾信息 
       echo 'QR code';
    }
}
?>
php生成网址二维码:

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

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

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