You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.3 KiB
38 lines
1.3 KiB
<?php
|
|
#==============================================================================
|
|
# LTB Self Service Password
|
|
#
|
|
# Copyright (C) 2009-2017 Clement OUDOT
|
|
# Copyright (C) 2009-2017 LTB-project.org
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# GPL License: http://www.gnu.org/licenses/gpl.txt
|
|
#
|
|
#==============================================================================
|
|
|
|
/* @function boolean send_sms_by_api(string $mobile, string $message)
|
|
* Send SMS trough an API
|
|
* @param mobile mobile number
|
|
* @param message text to send
|
|
* @return 1 if message sent, 0 if not
|
|
*/
|
|
function send_sms_by_api($mobile, $message) {
|
|
|
|
# PHP code
|
|
# ...
|
|
|
|
# Or call to external script
|
|
# $command = escapeshellcmd(/path/to/script).' '.escapeshellarg($mobile).' '.escapeshellarg($message);
|
|
# exec($command);
|
|
|
|
return 1;
|
|
}
|