Created
May 11, 2014 11:06
-
-
Save jesusnoseq/469545a9f4d30a19437e to your computer and use it in GitHub Desktop.
Envio de un SMS a traves de una peticion HTTP al servidor de la aplicacion SMS gateway para Android
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 | |
// IP del telefono Android | |
$ip="192.168.1.12"; | |
$puerto="9090"; | |
// Numero de telefono al que se enviara el SMS | |
$telf="+34XXXXXXXXX"; | |
$password="secreto"; | |
$text="BOOOOOOOOOOOM"; | |
// http://192.168.1.12:9090/sendsms?phone=+34XXXXXXXXX&text=BOOOOOOOOOOOM&password=secreto | |
$url="http://".$ip.":".$puerto."/sendsms?phone=".$telf."&text=".$text."&password=".$password; | |
// Peticion al servidor | |
$response = file_get_contents($url, false); | |
echo $response; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment