Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 187 | All time: 8,628 This week: 68 |
Version | License | PHP version | Categories | |||
ussd-pdu-converters 1.0.0 | Freely Distributable | 5 | Hardware |
Description | Author | |||
This class can convert Portable Data Unit commands. Innovation Award
|
PDU (Portable Data Unit) Converters implemented currently in Java and PHP.
I needed to convert between PDU and simple text for a USSD project. All I could find online were SMS PDU converters and they didn't work for me. I found https://github.com/gnomeby/ussd and extracted the conversion code. The PHP version is a exactly what I took from the code. The Java version is a direct port.
For PHP
require 'Converter.php';
use Pdu\Converter;
var_dump(Converter::toPDU('*124#')); //-> string 'AA988C3602' (length=10)
var_dump(Converter::toText('54747A0E6A97E7F3F0B90CBA87E7A0F1DB6D2FCBE9657208')); //-> string 'This message was converted!' (length=27)
For Java
//copy the code into your project or however you do these things
Converter.toPDU("*124#");
Converter.toText("54747A0E6A97E7F3F0B90CBA87E7A0F1DB6D2FCBE9657208");
Please use as you please. If you can, contribute improvements you make to the code. If you port it into another language, it would be great if you contributed that back as well. We have a suprising vacuum in this area online.
Files (3) |
File | Role | Description |
---|---|---|
Converter.java | Data | Auxiliary data |
Converter.php | Class | Class source |
README.md | Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
ussd-pdu-converters-2017-01-26.zip 2KB | |
ussd-pdu-converters-2017-01-26.tar.gz 2KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.