function checkSpam($ipAddress) {
    // Validate the IP address
    if (!filter_var($ipAddress, FILTER_VALIDATE_IP)) {
        echo "Invalid IP address format\n";

    // List of spam databases to check
    $spamDatabases = array(

    // Check each database for the IP address
    foreach ($spamDatabases as $db) {
        $query = $ipAddress . "." . $db;
        $result = gethostbyname($query);

        // Check if the IP address is listed
        if ($result == "" || $result == "::1") {
            echo "$ipAddress found in $db\n";
        } else {
            echo "$ipAddress not found in $db\n";

// Example usage
$ipToCheck = "123.456.789.10"; // Replace this with the IP address you want to check


It validates the IP address format, then checks it against several spam databases using DNSBL (DNS Blacklist) lookups. If the IP address is found in any of the databases, it prints a message indicating where it was found. Otherwise, it prints a message indicating that the IP address was not found in a particular database.

Comments (0)

There are no comments here yet, you can be the first!

Leave a Reply

Your email address will not be published. Required fields are marked *

Choose and Buy Proxy

Datacenter Proxies

Rotating Proxies

UDP Proxies

Trusted By 10000+ Customers Worldwide

Proxy Customer
Proxy Customer
Proxy Customer flowch.ai
Proxy Customer
Proxy Customer
Proxy Customer