/**
* 100k-specific: getDataByDomain — queries webid_domain table
* Returns key 'webid_domain' (not 'domain_info' like 1core)
* Must be loaded BEFORE 1core to take precedence via function_exists guard
*/
function getDataByDomain(mysqli $mysqli_conn,string $domain): ?array
{
if ($mysqli_conn->connect_error) {
error_log("Lỗi kết nối mysqli: " . $mysqli_conn->connect_error);
die("Không thể kết nối đến cơ sở dữ liệu.");
}
try {
$stmtDomain = $mysqli_conn->prepare("SELECT * FROM `webid_domain` WHERE `webid_domain`.`domain` = ? LIMIT 1");
if (!$stmtDomain) throw new Exception("Lỗi prepare: " . $mysqli_conn->error);
$stmtDomain->bind_param("s", $domain);
$stmtDomain->execute();
$domainData = $stmtDomain->get_result()->fetch_assoc();
$stmtDomain->close();
if (!$domainData) return null;
return ['webid_domain' => $domainData];
} catch (Exception $e) {
error_log("Lỗi DB: " . $e->getMessage());
die("Lỗi truy vấn dữ liệu.");
}
}
Warning: session_start(): Session cannot be started after headers have already been sent (sent from /usr/share/100k/coding/func.php on line 1) in /usr/share/100k/coding/config.php on line 30
IP 216.73.217.108