生成电子邮件地址和电话号码的二维码

发布于 2024-11-18 07:09:01 字数 497 浏览 2 评论 0原文

我有一个网站,人们可以在其中相互联系,而且人们通常还会在广告或分类广告文案中发布电子邮件或电话号码。我已经用图像替换了联系信息,这样它们就不会被机器人或谷歌抓取,但是我认为为找到的每个联系信息添加二维码是有意义的,这样人们就可以通过自己的手机回复而不会犯错。

我查看了用于生成二维码的谷歌图表 API,但它似乎只是生成“纯文本”二维码。这意味着它只会在屏幕上以文本形式显示提交的信息,用户必须将其复制/粘贴到电子邮件客户端或拨号器中才能使用。但是:如果我使用 http://www.nzs.com/qr-code/ 并用我的智能手机扫描结果,它会立即打开我的浏览器并带我到此页面,因此必须有一种方法来指定信息的某种 MIME 类型,并且手机可以选择适当的应用程序来处理的信息。

谁能告诉我如何使用 google Chart api 或 PHP/GDI 来做到这一点?我需要生成电话号码和电子邮件地址的二维码。

I have a website where people can contact each other, and quite often people also post emails or phone numbers in the ad or classifieds copy. I already replace the contact information with images so they cant be scraped by bot's or google, however i was thinking it would make sense to add a qr-code for each contact info found, so people can reply via their own phone without making typos.

I had a look at the google chart api for generating qr codes, but it seems like it just generates "plain text" qr codes. This means it will just show the submitted information as text on the screen, and the user has to copy/paste it into his email client or dialer to use it. BUT: If i use the tool at http://www.nzs.com/qr-code/ and scan the result with my smartphone, it will instantly open my browser and take me to this page, so there must be a way to specify a sort of mime-type for the information and the phone can choose the appropriate application to handle the information.

Can anyone tell me how to do this with the google chart api, or in PHP/GDI? I need to generate qr-codes for phone numbers and email adresses.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你是暖光i 2024-11-25 07:09:02

另请查看 ZXing。它是开源的,并且有很多示例代码。

Also take a look at ZXing. It's open source and there is a lot of sample code.

赠我空喜 2024-11-25 07:09:01

[我使用 iOS 版 QuickMark。]

据我所知,这是扫描端的检测问题,并结合您提供正确的源数据。

您到底为 URL 编码了什么?您需要包含协议。

例如,此查询 编码“www.example.com”并显示为文本。这不是一个 URL;而是一个 URL。这只是一些碰巧拼出域名的文本。
但是此查询对“http://www.example.com/”进行编码并被识别为 URL。
是希望是无用的电话号码。

这是有关各种 QR 码关键字的教程

[I use QuickMark for iOS.]

As far as I'm aware, this is a matter of detection on the scanning side, in combination with you providing proper source data.

What exactly did you encode for the URL? You need to include the protocol.

For example, this query encodes "www.example.com" and is displayed as text. That's not a URL; it's just some text that happens to spell out a domain name.
But this query encodes "http://www.example.com/" and is recognized as a URL.
This is a hopefully useless phone number.

Here's a tutorial on various QR code keywords.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文