<?
function sms_claro($nombre, $telefono, $msg){
 $msg.=" e-duativo.com";
 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://www.claro.com.gt/mensaje.php");  

 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt ($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_REFERER, "http://www.claro.com.gt/mensajes.html");
 curl_setopt($ch, CURLOPT_POSTFIELDS, "nombre=$nombre&telefono=$telefono&msg=$msg");
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 $xyz = curl_exec ($ch);
 curl_close ($ch);
}

function sms_telefonica($nombre, $telefono, $msg){
 $msg.=" e-duativo.com";
 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://216.184.96.114/sms/mensaje.php");
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 $xyz = curl_exec ($ch);
 curl_close ($ch);  

 $lineas=explode("\n",$xyz); 

 $id_sesion=substr($lineas[43],117,32);
 $id_random=substr($lineas[47],65,10);

 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://216.184.96.114/sms/mensaje.php");
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_REFERER, "http://216.184.96.114/sms/mensaje.php");
 curl_setopt($ch, CURLOPT_POSTFIELDS, "PHPSESSID=$id_sesion&to=$telefono&text=$msg. HiGuate.com&subject=$nombre&submit=Enviar&count=1&random=$id_random");
 $xyz = curl_exec ($ch);
 curl_close ($ch);
}

function sms_tigo($nombre, $numero, $mensaje){
 $nick=$nombre;
 $mensaje=str_replace(" ","%20",$mensaje);
 $mensaje.="%20e-ducativo.com";
 srand((double)microtime()*1000000);

 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://200.49.163.92/interactivo/client.php?orden=1&nick=$nick&foo=$foo");
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 $xyz = curl_exec ($ch);
 curl_close ($ch);

 $session=strval(substr($xyz,8));

 $foo=rand(9000,45000);

 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://200.49.163.92/interactivo/client.php?orden=21&session=$session&nick=$nick&dstphone=502$numero&pin=undefined&foo=$foo");
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 $xyz = curl_exec ($ch);
 curl_close ($ch);

 $foo=rand(9000,45000);

 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://200.49.163.92/interactivo/client.php?orden=3&session=$session&mensaje=$mensaje&foo=$foo");
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 $xyz = curl_exec ($ch);
 curl_close ($ch);

 $ch = curl_init();
 $res= curl_setopt ($ch, CURLOPT_URL,"http://200.49.163.92/interactivo/client.php?orden=6&session=$session&foo=$foo");
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 //$xyz = curl_exec ($ch);
 curl_close ($ch);
}
?>
