Created
May 16, 2016 12:23
-
-
Save kevinkl3/2531a6955ab781f9582fd51161bef605 to your computer and use it in GitHub Desktop.
Send SMS message with ExpertTexting SoapClient.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function enviarSMS($numero,$mensaje){ | |
if(strpos($numero,"504") == false){ | |
$numero = "504" . $numero;//Agrega codigo de pais | |
} | |
$USUARIO = "USER"; | |
$PSWD = "PASS"; | |
$API_KEY ="API_KEY"; | |
$SENDER = "YOUR NAME"; | |
$smsClient = new SoapClient("https://www.experttexting.com/exptapi/exptsms.asmx?WSDL"); | |
$salida = $smsClient->SendSMS( array('UserID'=>$USUARIO, 'PWD'=>$PSWD,'APIKEY'=>$API_KEY,'FROM'=>$SENDER,'TO'=>$numero, 'MSG'=>$mensaje)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment