diff options
-rw-r--r-- | composer.json | 29 | ||||
-rw-r--r-- | smppclient.class.php | 3 | ||||
-rw-r--r-- | sockettransport.class.php | 4 |
3 files changed, 33 insertions, 3 deletions
diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..86ed0f5 --- /dev/null +++ b/composer.json @@ -0,0 +1,29 @@ +{ + "name": "php-smpp/php-smpp", + "description": "PHP-based SMPP client lib", + "keywords": ["smpp", "sms", "texting", "gsm"], + "homepage": "http://github.com/onlinecity/php-smpp", + "type": "library", + "license": "LGPL", + "authors": [ + { + "name": "Hans Duedal", + "email": "hd@oc.dk", + "homepage": "http://oc.dk" + } + ], + "require": { + "php": ">=5.3.3", + "ext-sockets": "*", + "ext-mbstring": "*" + }, + "require-dev": { + }, + "autoload": { + "files": [ + "gsmencoder.class.php", + "sockettransport.class.php", + "smppclient.class.php" + ] + } +} diff --git a/smppclient.class.php b/smppclient.class.php index c21df0e..a502db0 100644 --- a/smppclient.class.php +++ b/smppclient.class.php @@ -266,6 +266,7 @@ class SmppClient * $message is always in octets regardless of the data encoding. * For correct handling of Concatenated SMS, message must be encoded with GSM 03.38 (data_coding 0x00) or UCS-2BE (0x08). * Concatenated SMS'es uses 16-bit reference numbers, which gives 152 GSM 03.38 chars or 66 UCS-2BE chars per CSMS. + * If we are using 8-bit ref numbers in the UDH for CSMS it's 153 GSM 03.38 chars * * @param SmppAddress $from * @param SmppAddress $to @@ -290,7 +291,7 @@ class SmppClient break; case SMPP::DATA_CODING_DEFAULT: $singleSmsOctetLimit = 160; // we send data in octets, but GSM 03.38 will be packed in septets (7-bit) by SMSC. - $csmsSplit = 152; // send 152 chars in each SMS since, we will use 16-bit CSMS ids (SMSC will format data) + $csmsSplit = (self::$csms_method == SmppClient::CSMS_8BIT_UDH) ? 153 : 152; // send 152/153 chars in each SMS (SMSC will format data) break; default: $singleSmsOctetLimit = 254; // From SMPP standard diff --git a/sockettransport.class.php b/sockettransport.class.php index 134ebc0..9ffcffc 100644 --- a/sockettransport.class.php +++ b/sockettransport.class.php @@ -69,7 +69,7 @@ class SocketTransport $ip4s[] = $hostname; } else if (preg_match('/^([0-9a-f:]+):[0-9a-f]{1,4}$/i',$hostname)) { // IPv6 address - $ip6s[] = hostname; + $ip6s[] = $hostname; } else { // Do a DNS lookup if (!self::$forceIpv4) { // if not in IPv4 only mode, check the AAAA records first @@ -375,4 +375,4 @@ class SocketTransport } } -class SocketTransportException extends RuntimeException { }
\ No newline at end of file +class SocketTransportException extends RuntimeException { } |