<?php 
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
$method = $_SERVER['REQUEST_METHOD'];
if($method == "OPTIONS") {
    die();
}

if (isset($_REQUEST['keyemp'])){$keyemp=$_REQUEST['keyemp'];}else{$keyemp="";}
if (isset($_REQUEST['numero'])){$numero=$_REQUEST['numero'];}else{$numero="";}
if (isset($_REQUEST['chkfte'])){$chkfte=$_REQUEST['chkfte'];}else{$chkfte="";}
if (isset($_REQUEST['documento'])){$documento=$_REQUEST['documento'];}else{$documento="";}
if (isset($_REQUEST['prefijo'])){$prefijo=$_REQUEST['prefijo'];}else{$prefijo="";}
if (isset($_REQUEST['empresa'])){$empresa=$_REQUEST['empresa'];}else{$empresa="";}
if (isset($_REQUEST['accion'])){$accion=$_REQUEST['accion'];}else{$accion="";}



//$url="https://akd.em-empire.net/api/controls/?prefijo=$prefijo&tipo=$tipo&rol=$rol&codigo=$codigo&curso=$curso&dia=$dia&hinicio=$hinicio&idactividad=$idactividad&idmat=$idmat";

$url="https://www.miayudaapp.com/new/controllers/dataicos/?keyemp=$keyemp&numero=$numero&chkfte=$chkfte&documento=$documento&prefijo=$prefijo&empresa=$empresa&accion=$accion";

$html = file_get_contents($url); //Convierte la información 
echo $html;


?>