- stripslashes: documentation ( source)
- json_decode: documentation ( source)
- header: documentation ( source)
<?php
/**
* DIRECCION EJECUTIVA DE INGRESOS
* GENERADOR DE URL CORTA, DEI-MOVIL
* 2014
*/
require 'load.php';
$metodo = (isset($_GET['metodo'])) ? @$_GET['metodo'] : NULL;
//$post_datos = (isset($_POST['post_datos'])) ? $_POST['post_datos'] : NULL;
// Debug mode GET
$post_datos = (isset($_GET['post_datos'])) ? $_GET['post_datos'] : NULL;
//echo "Debug: " . $post_datos;
if(!is_null($post_datos)){
$objeto_post_datos = json_decode(stripslashes($post_datos));
}else{
$objeto_post_datos = new stdClass();
}
header('Content-Type: application/json; charset=utf-8');
$api = new Api($datosDB, $metodo, $objeto_post_datos, $FormulariosEstaticos, URL_HOST, TAM_TOKEN, URL_FORMULARIOS, VALIDEZ_URL, REQUEST_PER_LINK);
echo $api->api_response;
?>