{"id":18714833,"url":"https://github.com/instasent/sms-counter-php","last_synced_at":"2025-04-06T22:11:45.911Z","repository":{"id":56992181,"uuid":"39284852","full_name":"instasent/sms-counter-php","owner":"instasent","description":"SMS Counter and sanitize tools","archived":false,"fork":false,"pushed_at":"2024-01-10T16:11:33.000Z","size":55,"stargazers_count":49,"open_issues_count":7,"forks_count":29,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T21:08:14.127Z","etag":null,"topics":["gsm","php","sms-counter"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instasent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-18T03:16:23.000Z","updated_at":"2024-07-04T02:11:21.000Z","dependencies_parsed_at":"2024-06-18T14:07:52.558Z","dependency_job_id":"a1166bf9-b589-491e-bca3-13e607088712","html_url":"https://github.com/instasent/sms-counter-php","commit_stats":{"total_commits":39,"total_committers":6,"mean_commits":6.5,"dds":0.4871794871794872,"last_synced_commit":"a0f017d6fa776a33e18a4e36257fb5d6453897ef"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instasent%2Fsms-counter-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instasent%2Fsms-counter-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instasent%2Fsms-counter-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instasent%2Fsms-counter-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instasent","download_url":"https://codeload.github.com/instasent/sms-counter-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gsm","php","sms-counter"],"created_at":"2024-11-07T13:06:30.592Z","updated_at":"2025-04-06T22:11:45.886Z","avatar_url":"https://github.com/instasent.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instasent - SMS Counter for PHP\n\nCharacter counter for SMS Messages\n\n[![Build Status](https://img.shields.io/travis/instasent/sms-counter-php.svg?style=flat-square)](https://travis-ci.org/instasent/sms-counter-php)\n[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9.svg?style=flat-square)](https://insight.sensiolabs.com/projects/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9)\n\n## Usage\n\n```php\nuse Instasent\\SMSCounter\\SMSCounter;\n\n$smsCounter = new SMSCounter();\n$smsCounter-\u003ecount('some-string-to-be-counted');\n$smsCounter-\u003ecountWithShiftTables('some-string-to-be-counted');\n```\n\nwhich returns\n```\nstdClass Object\n(\n[encoding]    =\u003e GSM_7BIT\n[length]      =\u003e 25\n[per_message] =\u003e 160\n[remaining]   =\u003e 135\n[messages]    =\u003e 1\n)\n```\n\n##### UTF16 notice\n\nWhen 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)\n\n#### Sanitization\n\nYou can sanitize your text to be a valid strict GSM 03.38 charset\n\n```php\nuse Instasent\\SMSCounter\\SMSCounter;\n\n$smsCounter = new SMSCounter();\n$smsCounter-\u003esanitizeToGSM('dadáó'); //return dadao\n```\n\n#### National Language Shift Tables\n\nStarting release 8 of GSM 03.38 some additional charsets are allowed. This is the list of such National Language Shift Tables currently supported\n\n- [Turkish](https://en.wikipedia.org/wiki/GSM_03.38#Turkish_language_(Latin_script))\n- [Spanish](https://en.wikipedia.org/wiki/GSM_03.38#Spanish_language_(Latin_script))\n- [Portuguese](https://en.wikipedia.org/wiki/GSM_03.38#Portuguese_language_(Latin_script))\n\n\n## Installation\n\n`sms-counter-php` is available via [composer](http://getcomposer.org) on [packagist](https://packagist.org/packages/instasent/sms-counter-php).\n\n```json\n{\n    \"require\": {\n       \"instasent/sms-counter-php\": \"^0.4\"\n    }\n}\n```\n\n## License\n\nSMS Counter (PHP) is released under the [MIT License](LICENSE-MIT.md)\n\n### Mentions\n\n* Original idea : [danxexe/sms-counter](https://github.com/danxexe/sms-counter)\n* Fork Idea from: [acpmasquerade/sms-counter-php](https://github.com/acpmasquerade/sms-counter-php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstasent%2Fsms-counter-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstasent%2Fsms-counter-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstasent%2Fsms-counter-php/lists"}