forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
601 B
26 lines
601 B
#!/usr/bin/php -q |
|
<?php |
|
|
|
echo "Enviando SMS...Aguarde"."\r\n"; |
|
|
|
$telefone = $argv[1]; |
|
|
|
$url = sprintf("http://www.iagentesms.com.br/webservices/smslote.php?usuario=teclan&senha=want2131&mensagem=%s&celulares=%s", |
|
urlencode('TESTANDO A INTEGRACAO SIMPLES IP'),$telefone); |
|
|
|
$ch = curl_init(); |
|
curl_setopt($ch, CURLOPT_URL, $url); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10); |
|
$content = trim(curl_exec($ch)); |
|
curl_close($ch); |
|
|
|
|
|
if(substr($content,0,4) == "ERRO"){ |
|
echo "Erro de envio"."\r\n"; |
|
}else{ |
|
echo "Sucesso! - ".$content."\r\n"; |
|
} |
|
|
|
|
|
|