使用Zxing在线二维码解码器使用php
我正在创建一个需要我解码二维码的网站。我研究了一下,发现php本身不支持二维码解码。因此,我决定使用提供二维码解码的网络服务。我发现了一个很好的网络服务 Zxing,它可以对提交给它的图像进行解码。我发现的问题是,我在网上找不到足够的关于 Zxing Web 服务的使用的文档,比如参数应该如何传递到 Web 服务的 url。我要访问的网址是 http://zxing.org/w/decode.jspx, 但是我应该如何在 php.ini 中使用 SOAP / XML-RPC 来使用这个 Web 服务呢? 我研究了单击“提交”按钮时返回的结果,它是一个简单的文本文档。 请指导我如何使用 Zxing Web 服务,是否有任何在线文档?
谢谢。
I am creating a website that requires me to decode qr codes. I did my research and found out that php does not natively support decoding of qr codes. So, I decided to use the webservices that provide decoding of qr codes. I came across a good webservice, Zxing, which decodes the image submitted to it. The problem that I found was that I could not find enough documentation online with regards to the usage of the Zxing webservices, like how should the parameters be passed to the url of the webservice. The url that I am to access is, http://zxing.org/w/decode.jspx,
but then how should I consume this webservice using SOAP / XML-RPC in php.
I studied the result that is returned when I click on the "Submit" button, and its a simple text document.
Please, do give me guidance as to how should I consume the Zxing webservice, are there any online documentations?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它并没有真正被记录为 API,因为它不是 API。您不应该集成以供您自己的服务使用。这是我为了向网络上的最终用户免费提供服务而运行的网站。可以向其发送一些请求,但对于任何大量请求,请运行您自己的请求。
但 HTML 几乎是您需要的所有文档:您可以查看它发布到的 URL,以及它发送的参数。它实际上只是参数“f”下的图像内容的 POST,或者使用参数“u”指定要加载的 URL 的 GET 到同一 URL。
完整的源代码位于 http://code.google.com/p/zxing 下
zxingorg/
。您可能想运行自己的副本,以便可以控制它并修改它。It's not really documented as an API since it's not an API. You are not meant to integrate for use in your own service. It's a site I run as a free courtesy to end users on the web. It's OK to send a few requests at it, but for any significant volume, please run your own.
But the HTML is pretty much all the documentation you need: you can see what URL it posts to, and what parameters it sends. It's really just a POST of image content under parameter 'f', or a GET to the same URL with parameter 'u' specifying a URL to load.
The complete source code is at http://code.google.com/p/zxing, under
zxingorg/
. You probably want to run your own copy, so you can control it and modify it.