Your IP : 18.118.33.130
<?php
header('Access-Control-Allow-Origin: *');
//$db = new mysqli('localhost', 'covimbdk_winner', 'nerWinIta', 'covimbdk_covis');
include("../profile/lib/connect.inc.php");
if(isset($_GET['username'])) {
$username = $_GET['username'];
$password = urldecode($_GET['password']);
$sql = $db->query("SELECT * FROM user WHERE user='$username'");
$row = $sql->fetch_object();
if($sql->num_rows < 1) {
echo 0;
}
elseif(password_verify($password, $row->pass)){
echo 1;
}
elseif(!isset($_GET['password'])){echo $row->firstname.' '.$row->lastname; }
else {
echo 0;//$_GET['password'];
}
}
if(isset($_GET['balance'])) {
$user = $_GET['balance'];
$uidx= $covis->userToKey($user);
if($uidx>1){
echo $covis->totalEarnings($uidx)*400;
}else{ echo 0; }
}
// $yam=urlencode($password);
// header("location: api2.php?username=$username&password=$yam");
// exit;