将磁条信息从身份证发送到 Web 服务和 API 来处理此信息

发布于 2024-12-11 15:36:54 字数 136 浏览 0 评论 0原文

也许有人可以在这个问题上启发我,我正在研究普通信用卡机器(他们应该能够)是否可以读取身份证(任何带有磁条的卡)。我想知道这些卡在发布到某个 Web 服务/网络时是如何编码的(它们对 IP 网关进行编码吗?)...以及是否有 api 或一些文献来处理磁条信息。

Maybe someone could enlighten me on this subject, Im looking into if regular credit card machines (they should be able to) could read id cards (any card with a magnetic stripe). I was wondering how these cards are encoded when posting to a certain web service/network (do they encode the IP gateway?)...and if there was an api or some literature into processing magnetic stripe info.

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

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

发布评论

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

评论(1

小梨窩很甜 2024-12-18 15:36:54

信用卡机器可能可以读取任何卡上的条带,但如果数据格式不正确,它就不知道如何处理数据。条带通常是具有 3 个轨道的多轨条带。卡号、持卡人姓名以及其他内容通常使用磁道 1 进行编码,磁道 2 是磁道 1 数据的某个子集。

ID 卡可能使用不同的数据格式。它只是一条可以用读卡器读取的磁带。您可能可以以不到 10 美元的价格在线购买阅读器。我见过这些设备是 9 针 RS232 串行设备,但它们大多是模拟键盘的 USB 类型设备。当你刷卡时,读卡器就像你输入了数据一样。

至于编码 IP 地址……也许吧,但可能性不大。诸如地址之类的临时地址最好不要放在您发给人们的所有卡片上。否则,当你改变IP时,你必须重新发行所有卡。最好的办法是读取该卡并查看数据中的内容。

A credit card machine probably can read the strip on any card, but it won't know what to do with the data if it isn't in the proper format. The strip is usually a multi-track strip with 3 tracks. The card number, name of the card holder, and other stuff is usually encoded using track 1 with track 2 being some subset of the track 1 data.

An ID card might use a different data format. It is just a strip of magnetic tape that can be read with a card reader. You can probably buy a reader online for under $10. I've seen these come as 9-pin RS232 serial devices, but they'll mostly come as USB type devices that emulate a keyboard. When you swipe the card, the reader acts like you typed the data in.

As for encoding an IP address....maybe, but it is unlikely. Things like addresses that can be transient would be better not to put on all the cards you are issuing to people. Otherwise, when you change the IP you have to re-issue all the cards. Your best bet is to read the card and see what is in the data.

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