|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 179 ||All time: 8,642 This week: 188|
This class can convert Portable Data Unit commands.
It takes a string with a command and converts it to PDU command.
The class can also take a PDU answer and convert it into readable text.
A Java version of the class is also made available.
Prize: SourceGuarding PHP encoder tool
|USSD (Unstructured Supplementary Service Data) is a technology for sending text messages from a mobile phone on GSM network and applications that process those messages by the means of Portable Data Units (PDU).
This class can encode and decode commands in PDU format into text.
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.
var_dump(Converter::toPDU('*124#')); //-> string 'AA988C3602' (length=10)
var_dump(Converter::toText('54747A0E6A97E7F3F0B90CBA87E7A0F1DB6D2FCBE9657208')); //-> string 'This message was converted!' (length=27)
//copy the code into your project or however you do these things
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.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.