Update RBL check script with DB functions

Update RBL check script with DB functions

RBL servers are in array $rbls in the script

we store them in DB


get them from DB

$sql = "SELECT * FROM `rblservers` WHERE `use` = 'true'";

and place it in array

get clientnumbers from DB

$sqlclientsresult = "SELECT clientnr FROM `clients`";

for each client get ipaddresses to check

$ip is in the script now

We have a table ipaddress where all IP's are in, get them from table and do rblcheck for each

We store the IP as longip

$sqlclientsipsresult = "SELECT id, inet_ntoa(longip) as IP FROM `ipaddress` WHERE `clientid` = '" . $rowclients['clientnr'] . "' AND `test` = '1'";

$nu = gmdate($this->dateFormat, time());

Store the scan for the ip

listedinrbl is amount of RBL where IP is positive

INSERT INTO `rbltests` (`id`, `ipaddressid`, `datetime`, `listedinrbl`)

If listed store it rblpositive

INSERT INTO `rblpositive` (`ipid`, `rblserverid`, `datetimefirstfound`, `datetimelastfound`, `listed`)

INSERT INTO `rblpositive` (`ipid`, `rblserverid`, `datetimefirstfound`, `listed`) VALUES ('1', '8', '$nu', '1')

If solved

UPDATE `rblpositive` SET `datetimelastfound`='$nu', `listed`='0'

This script uses

$rev = join('.', array_reverse(explode('.', trim($ip))));

$lookup = sprintf('%s.%s', $rev, $rbl);

$listed = gethostbyname($lookup) !== $lookup;

for the tests

Another solution is:

$reversedIP = implode('.', array_reverse(explode ('.', $ip)));

// Do the DNS lookup

$result = "";

exec("nslookup " . $reversedIP . "." . $value, $result);

Please test which works best: fastest versus server load

Квалификация: PHP, MySQL, Linux, SQL, Архитектура ПО

Показать больше update xml php script, url availability check script, update xls file script, uptime check script, script counter strike servers list, connection speed check script, update database using script file, update xls php script, update access tables script, php rbl check script, rbl check script linux

О работодателе:
( 40 отзыв(-а, -ов) ) Brugge, Belgium

ID проекта: #20826986



Hello there, As discussed in chat, the project is already finished and completed. Looking forward to working on more projects.

€105 EUR за 1 день
(101 отзывов(-а))

4 фрилансеров(-а) в среднем готовы выполнить эту работу за €121


Hello Sir, I understand project scope but having few questions that needs to be clear in more detail. Please let me know if we can discuss the requirement over chat or call. I am working from last 12 years in PHP Больше

€140 EUR за 7 дней(-я)
(34 отзывов(-а))

Hi. Sir I would be very glad to meet you. I read your description carefully. I can bring you perfect result as you want. I am an experienced web developer and designer with the depth knowledge related to PHP, Bootstrap Больше

€140 EUR за 7 дней(-я)
(2 отзывов(-а))

Hello sir! Nice to meet you. I am very interested in your project. I am a PHP&MYSQL expert. I have rich experience in this field. I am ready for you anytime I think you will get better result. I'll do my best for compl Больше

€100 EUR за 1 день
(3 отзывов(-а))