All Projects → instasent → sms-counter-php

instasent / sms-counter-php

Licence: MIT License
SMS Counter and sanitize tools

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to sms-counter-php

Esp32 Pppos Example
Example of using ESP32 with GSM modem and lwip+pppos
Stars: ✭ 145 (+262.5%)
Mutual labels:  gsm
openbsc
Historical archive of ancient, unsupported old OpenBSC + OsmoNITB; Use OsmoBSC and OsmoMSC now! Mirrored from https://gitea.osmocom.org/cellular-infrastructure/openbsc
Stars: ✭ 52 (+30%)
Mutual labels:  gsm
SDR-Detector
GSM Scanner, RTL-SDR, StingWatch, Meteor
Stars: ✭ 56 (+40%)
Mutual labels:  gsm
Sim800l
Library sim800l for Arduino UNO (maybe sim900l work)
Stars: ✭ 186 (+365%)
Mutual labels:  gsm
osmo-msc
Osmocom implementation of 3GPP Mobile Swtiching Centre (MSC); mirrored from https://gitea.osmocom.org/cellular-infrastructure/osmo-msc
Stars: ✭ 21 (-47.5%)
Mutual labels:  gsm
bts-ce-lite
BTS-CE-Lite (Boda-Lite) is a cross platform vendor and technology agnostic telecommunication network management desktop application
Stars: ✭ 24 (-40%)
Mutual labels:  gsm
Gsm v5
gsm module library for STM32 LL
Stars: ✭ 135 (+237.5%)
Mutual labels:  gsm
gsm
gsm module library for STM32 LL
Stars: ✭ 28 (-30%)
Mutual labels:  gsm
GSMSim
GSM Library for SIMCOM Modules on Arduino.
Stars: ✭ 99 (+147.5%)
Mutual labels:  gsm
smsc
Flexible and scalable GSM Short Message Center (SMSC)
Stars: ✭ 23 (-42.5%)
Mutual labels:  gsm
Lwgsm
Lightweight AT commands parser for SimCOM GSM modules
Stars: ✭ 201 (+402.5%)
Mutual labels:  gsm
FreePhone
FreePhone es un proyecto de investigación sobre privacidad en dispositivos móviles. Con este repositorio pretendemos liberar toda la experiencia acumulada durante la creación de un smartphone casero.
Stars: ✭ 57 (+42.5%)
Mutual labels:  gsm
osmo-bts
Osmocom GSM Base Transceiver Station (BTS); mirrored from https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
Stars: ✭ 51 (+27.5%)
Mutual labels:  gsm
Imsi Catcher
This program show you IMSI numbers of cellphones around you.
Stars: ✭ 2,198 (+5395%)
Mutual labels:  gsm
simtrace2
Osmocom SIM card tracer, v2.0; mirror of https://gitea.osmocom.org/sim-card/simtrace2
Stars: ✭ 54 (+35%)
Mutual labels:  gsm
Sim800 mqtt
Visit our blog/website for more information
Stars: ✭ 142 (+255%)
Mutual labels:  gsm
node-gsm
📲 gsm modem module for node.js
Stars: ✭ 23 (-42.5%)
Mutual labels:  gsm
exclusiveunlock
GSM Code selling store via IMEI or File.
Stars: ✭ 35 (-12.5%)
Mutual labels:  gsm
docker-playground
Osmocom dockerfiles, mostly for test automation; mirror of https://gitea.osmocom.org/osmocom/docker-playground
Stars: ✭ 15 (-62.5%)
Mutual labels:  gsm
RFMap
RFMap - Radio Frequency Mapper
Stars: ✭ 23 (-42.5%)
Mutual labels:  gsm

Instasent - SMS Counter for PHP

Character counter for SMS Messages

Build Status SensioLabsInsight

Usage

use Instasent\SMSCounter\SMSCounter;

$smsCounter = new SMSCounter();
$smsCounter->count('some-string-to-be-counted');
$smsCounter->countWithShiftTables('some-string-to-be-counted');

which returns

stdClass Object
(
[encoding]    => GSM_7BIT
[length]      => 25
[per_message] => 160
[remaining]   => 135
[messages]    => 1
)
UTF16 notice

When using unicode chars over U+10000 (mainly emoticons 😎) on messages larger than 70 chars the remaining value will actually be the remaining chars in last message part only, this is due to how those chars are encoded using two 16bit chars and max part length being an odd number (67)

Sanitization

You can sanitize your text to be a valid strict GSM 03.38 charset

use Instasent\SMSCounter\SMSCounter;

$smsCounter = new SMSCounter();
$smsCounter->sanitizeToGSM('dadáó'); //return dadao

National Language Shift Tables

Starting release 8 of GSM 03.38 some additional charsets are allowed. This is the list of such National Language Shift Tables currently supported

Installation

sms-counter-php is available via composer on packagist.

{
    "require": {
       "instasent/sms-counter-php": "^0.4"
    }
}

License

SMS Counter (PHP) is released under the MIT License

Mentions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].