Hi all,
My Webhost provides an SMS service, with an API and various examples, where on can send an SMS when “something” happens/triggers.
I have to call this URL to send SMS’es (“Texts” i think you often refer to them in the States:)
The code examples they have, are in PHP and Ruby, but I assume PHP is the way we go here. The ducumentation is acually in English, so here follows: https://gw1.tel.gigahost.dk/docs/
Here below is the example from PHP, with test phone-numbers. The code makes it look, like it sends from my phone, but I just want to use it to get an SMS when someone registers, so I can approve them right away.
Later also to send members SMS’s when something special occurs (a members have won a contest or so, but right now I just need adjusting the code to fit EE, and place it the the right place.
<?php
require('SmsSender.class.php');
$username = 'username';
$password = 'password';
$sender = '+4542031337';
$recipient = '+4542001234';
$message = 'This is a Test Message.';
$smsSender = new SmsSender($username,$password);
$smsSender->sendMessage($sender,$recipient,$message);
?>This would be an awesome Module by the way, for those who have Module-coding skills 😊
Can you help me alter the code to fit EE2, and place the code the right place when a new user signs up, please.
Then you all very much if you can help, Cheers, Thomas
Pointblank.dk
TommyKnockers,
Can you help me alter the code to fit EE2, and place the code the right place when a new user signs up, please.
You would need to create an extension here and make use of a member hook
I am moving this thread to the Development and Programming forum for you as more appropriate there
If you are getting your feet wet here there is an extension walk-through in our docs
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.