What is nfc-for-php?
This library is a toy for me. You can read NFC with libnfc written in PHP.
Requirements
- PHP 7.4+
- PHP FFI
- libnfc 1.8.0 (if you use NFC reader for PaSoRi RC-S330)
- libusb 1.0.24 (if you use NFC reader for PaSoRi RC-S380)
Tested
- Mac Big Sur
- FeliCa
- PASMO
- Suica
- KONAMI e-AMUSEMENT pass
- Pixel5
- PaSoRi RC-S330
- You cannot touch Apple Wallet on iOS
- https://www.amazon.co.jp/dp/B001MVPD8U/
- PaSoRi RC-S380 (experimental)
- Supported only to a FeliCa
- You can touch Apple Wallet on iOS
- https://www.amazon.co.jp/dp/B00948CGAG/
Quick start
Mac
RC-S330
- Install libnfc
$ brew install libnfc
- Install this library
$ composer require m3m0r7/nfc-for-php
- Connect NFC Device into your machine.
- Run example code
$ cd /path/to/nfc-for-php
$ php examples/nfc-poll-simple.php
- Put your NFC
- You can get output.
RC-S380
- Install libnfc
$ brew install libusb
- Install this library
$ composer require m3m0r7/nfc-for-php
- Connect NFC Device into your machine.
- Run example code
$ cd /path/to/nfc-for-php
$ php examples/rcs380-nfc-poll-simple.php
- Put your NFC
- You can get output.
How to use
- See examples
License
- MIT