Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: image/x-png'); //or whatever
- readfile('23456.png');
- die();
- ?>
- <?php
- $servername = "localhost";
- $username = "db_local";
- $password = "123456";
- $dbname = "prueba";
- $method = $_SERVER['REQUEST_METHOD'];
- $request = explode('/', trim($_SERVER['PATH_INFO'],'/'));
- $input = json_decode(file_get_contents('php://input'),true);
- $usuario = array_shift($request);
- $clave = array_shift($request);
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- echo "La conexion no ha sido posible";
- }
- $sql = "SELECT V.* FROM `VAR_GLOBAL` V INNER JOIN CLIENTES C ON C.NCliente LIKE '$usuario' AND C.Nombre LIKE '$clave';";
- $result = mysqli_query($conn, $sql);
- if (mysqli_num_rows($result) > 0) {
- while($row = mysqli_fetch_assoc($result)) {
- echo $row['EncPwd'] . "|" . $row['EncPwd2'];
- }
- } else {
- echo "No hay resultados";
- }
- mysqli_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement