mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-20 09:35:59 +02:00
More RST updates
This commit is contained in:
parent
d88d292cfc
commit
93a52abed6
2 changed files with 22 additions and 9 deletions
|
@ -138,6 +138,22 @@ function fetchCount($pdo, $tableName) {
|
|||
return $result['count'];
|
||||
}
|
||||
|
||||
function fetchDomainCount($pdo, $tld_id) {
|
||||
// Calculate the end of the previous day
|
||||
$endOfPreviousDay = date('Y-m-d 23:59:59', strtotime('-1 day'));
|
||||
|
||||
// Prepare the SQL query
|
||||
$query = "SELECT COUNT(id) AS count FROM domain WHERE crdate <= :endOfPreviousDay AND tldid = :tldid";
|
||||
$stmt = $pdo->prepare($query);
|
||||
$stmt->bindParam(':endOfPreviousDay', $endOfPreviousDay);
|
||||
$stmt->bindParam(':tldid', $tld_id, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
|
||||
// Fetch and return the count
|
||||
$result = $stmt->fetch();
|
||||
return $result['count'];
|
||||
}
|
||||
|
||||
// Function to check domain against Spamhaus SBL
|
||||
function checkSpamhaus($domain) {
|
||||
// Append '.sbl.spamhaus.org' to the domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue