@@ -27,9 +27,13 @@ |
||
| 27 | 27 | $send = $sms->send($number, $text); |
| 28 | 28 | if ($send['check']) { |
| 29 | 29 | echo "SMS was successfully sent."; |
| 30 | - if (is_int($send['free'])) echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
| 31 | - else if (empty($send['free'])) echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
| 32 | - else 'Unknown how many free SMS left this month.'; |
|
| 30 | + if (is_int($send['free'])) { |
|
| 31 | + echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
| 32 | + } else if (empty($send['free'])) { |
|
| 33 | + echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
| 34 | + } else { |
|
| 35 | + 'Unknown how many free SMS left this month.'; |
|
| 36 | + } |
|
| 33 | 37 | } else { |
| 34 | 38 | echo "SMS was not sent."; |
| 35 | 39 | } |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | * @param string $number - number of the recipient (9 digits without leading zero for national numbers e.g. 501234567; two leading zeros followed by prefix for international numbers e.g. 004912345678901; no spaces or special chars) |
| 108 | 108 | * @param string $text - content of the SMS |
| 109 | 109 | */ |
| 110 | - // TODO: check number for validaty |
|
| 110 | + // TODO: check number for validaty |
|
| 111 | 111 | public function send($number, $text) |
| 112 | 112 | { |
| 113 | 113 | if (strlen($text) <= 0 || strlen($text) > $this->max_length) { |