Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include_once('../../library/class.registrosapp.php');
include_once('../../library/class.enviopushios.php');
include_once('../../library/class.enviopushandroid.php');
// API access key from Google API's Console
ini_set("display_errors", 1);
$device = 'iPhone';//isset($_GET['device']) ? $_GET['device'] : '';
//print_r($_SERVER);
// echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
echo $device;
echo "<br>";
$oRegistrosApp = new RegistrosApp();
$arrRegistros = $oRegistrosApp->GetAll(array('Plataforma' => $device));
switch ($device) {
case 'Android':
$oEnvioPushAndroid = new EnvioPushAndroid();
$registrationIds = array();
foreach ($arrRegistros as $oRegistro)
{
$registrationIds[] = $oRegistro->CodigoRegistro;
}
$result = $oEnvioPushAndroid->EnviarAlerta('SAR Médicos', 'Bienvenido a la App de la SAR - Médicos!', $registrationIds);
echo "Android result:<br>$result";
break;
case 'iPhone':
$oEnvioPushIOS = new EnvioPushIOS(dirname(__FILE__) . '/aps.pem', 'aps.cer');
foreach ($arrRegistros as $oRegistro)
{
$result = $oEnvioPushIOS->EnviarAlerta('SAR Médicos', 'Bienvenido a la App de la SAR - Médicos!', $oRegistro);
echo json_encode($result);
}
break;
default:
die('Wrong action !');
}
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat