Nicholas Skinner

Freelance website and web application developer

8-bit SMS PDU Encoding via PHP

SMS PDU Encode PHP ScreenshotFor a recent project to remotely update software on Telit GSM modems I had a need to create 8-bit PDU messages using PHP, with support for the validity (expiry/timeout) period.

After searching on Google I found several online JavaScript based tools available including those by rednaxela, twit88, kekekasvi, and a C# SMS/PDU library by Stefan Mayr (which I have used in other desktop based tools) however the PHP side of things was somewhat lacking. The only code I could easily find was some by Vincent Heet however it is not licensed for commercial use, only supports 7 bit encoding, and does not support the validity period in a “clean” way (i.e. without manually calculating it and specifying the value in hex).

I therefore spent some time looking over the available documentation, working out how to encode PDU messages, and writing my own basic PHP PDU SMS encoding class supporting 8-bit PDU and (relative type) message validity periods.

Download: PHP SMS PDU Encoder

One Response to “8-bit SMS PDU Encoding via PHP”

  1. 8-bit SMS PDU Decoding via PHP - Nicholas Skinner’s Blog Says:

    […] with needing to encode 8-bit SMS PDU messages via PHP I also needed to decode them, therefore after looking into what was involved I wrote my own […]

Leave a Reply