We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Where to put "Send SMS when new user registers (Have PHP code ready)

Development and Programming

Thomas Boelskifte's avatar
Thomas Boelskifte
87 posts
15 years ago
Thomas Boelskifte's avatar Thomas Boelskifte

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:)

https://gw1.tel.gigahost.dk

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

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
15 years ago
John Henry Donovan's avatar John Henry Donovan

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

       
Thomas Boelskifte's avatar
Thomas Boelskifte
87 posts
15 years ago
Thomas Boelskifte's avatar Thomas Boelskifte

cool john, thank you very much 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.