$usuario, 'password'=>$password, 'curp'=>$curp); // Send the request $ch = curl_init($webserv); curl_setopt($ch, CURLOPT_URL, $webserv); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "usuario=$usuario&password=$password&curp=$curp"); // Send the request $response = curl_exec($ch); // Decode the response //Print $response; $responseData = json_decode($response, TRUE); // print_r($responseData); // Close the cURL handler curl_close($ch); $msg = $responseData['response'] == TRUE ? "":"Cerificado no encontrado"; $certificado = $responseData['data']; if ($responseData['message'] != "") { $msg = $responseData['message']; $certificado['nombre'] = ""; $certificado['apellidoPaterno'] = ""; $certificado['apellidoMaterno'] = ""; $certificado['curp'] = ""; $certificado['fecha_nacimiento'] = ""; $certificado['matricula'] = ""; $certificado['nivel'] = ""; $certificado['nombre_escuela'] = ""; $certificado['escuela_procedencia'] = ""; $certificado['folio_certificado'] = ""; $certificado['fecha_exp'] = ""; $certificado['promedio'] = ""; $certificado['folio_rodar'] = ""; $certificado['sello_sep'] = ""; $certificado['firma_electronica'] = ""; } } else { //$msg="Indique la CURP"; $certificado['nombre'] = ""; $certificado['apellidoPaterno'] = ""; $certificado['apellidoMaterno'] = ""; $certificado['curp'] = ""; $certificado['fecha_nacimiento'] = ""; $certificado['matricula'] = ""; $certificado['nivel'] = ""; $certificado['nombre_escuela'] = ""; $certificado['escuela_procedencia'] = ""; $certificado['folio_certificado'] = ""; $certificado['fecha_exp'] = ""; $certificado['promedio'] = ""; $certificado['folio_rodar'] = ""; $certificado['sello_sep'] = ""; $certificado['firma_electronica'] = ""; } ?>