<?php

/**
 *
 * @copyright  2022 mcpalo.com
 * @version    1
 * @link       http://www.mcpalo.com
 */

require_once 'sendhttp.php';

function getcredit($login, $password) {
	$curl = 'https://bezillion.com/api/v1/getcredit' . '?' . 'login=' . urlencode($login) . '&' . 'password=' . urlencode($password);

	$response=sendget($curl);

	if (!$response or $response[0] != 200) {
		return false;
	}

	$r=json_decode($response[2], true);

	if ($r['status'] == 'success') {
		return ($r['data']['credit']);
	}

	return false;
}
