Send SMS txt to phones?
Send SMS txt to phones?
Hi, say I want to txt message all people signed up. Would that be possible?
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
Hi,
there is no such function build-in AppGini. You may connect to an external service to acheive this, but need to code it.
there is no such function build-in AppGini. You may connect to an external service to acheive this, but need to code it.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Send SMS txt to phones?
Ok thanks, I thought as much. It would be too much of a project for me to code it. Let me know if you ever decide to code such a plugin though as I would be interested.
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
Hi again, just out of interest. Would you know of any 3rd party companies that AppGini could connect to? I appreciate there would be coding via the Appgini end, but would be interesting to make some progress toward the goal.
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
twilio.com is a well known company offering paid SMS gateway services (and other gateway services). There are many others on the market.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Send SMS txt to phones?
Great thanks. Actually thinking about it. Is it possible to send phone Notifications to Android/Apple. Presume that's an whole new debate/level?
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
Hi,
actually your need is not very clear, so it is not easy to help. Why cant you just use the mail function?
actually your need is not very clear, so it is not easy to help. Why cant you just use the mail function?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Send SMS txt to phones?
Hi, that's a good question - well I wanted something more instant, whereas email doesn't always get noticed.
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
That said, as it's in place already - it may well be ok. Was just interested in what was possible
Best Wishes,
Mark
Mark
Re: Send SMS txt to phones?
Much is possible: immediate in-browser notification of logged in users, WhatsApp notification, Email or SMS. It depends on your requirements and budget.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Send SMS txt to phones?
I've been using Twilio for a long time without any problems.
After creating an account with twilio and downloading their files.
Just add this to /hooks/tablename.php at the beginning of the file:
and add this to the end:
Then you can call sendSMS inside after_update, or after_insert:
After creating an account with twilio and downloading their files.
Just add this to /hooks/tablename.php at the beginning of the file:
Code: Select all
require_once $_SERVER["DOCUMENT_ROOT"]."/vendor/twilio-php-master/Twilio/autoload.php";
use Twilio\Rest\Client;
Code: Select all
function sendSMS($data, $memberInfo){
$staffPhone = sqlValue("select custom2 from membership_users where memberID='{$data['username']}'");
$sid = 'YOUR SID';
$token = 'YOUR TOKEN';
$client = new Client($sid, $token);
$client->messages->create("$staffPhone",
array('from' => 'YOUR TWILIO NUMBER HERE',
'body' => "Body message here".
"\n\n".
"Field: {$data['field']}".
"\n\n".
"Thank you!!!")
);
break;
}
Code: Select all
function yourTableName_after_update($data, $memberInfo, &$args){
sendSMS($data, $memberInfo);
return TRUE;
}
Re: Send SMS txt to phones?
How do you loop through the list of phone numbers obtained from SQL with this function to send SMS to multiple recipients?
Re: Send SMS txt to phones?
Hi,
even as this should be easy to find online (google) ... try something like this
Olaf
even as this should be easy to find online (google) ... try something like this
Code: Select all
$sqlString = "SELECT field1, field2 FROM yourtable;";
$sql_Result = sql($sqlString, $eo);
while ($row_Fields = db_fetch_assoc($sql_Result)) {
DO SOMETHING HERE WITH $row_Fields['field1'] AND $row_Fields['field2']
}
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Send SMS txt to phones?
Thank you-- ended up using foreach (explode(",", $toNumbers) as $toNumber) in order to pass each phone number from a table.