Find Jobs
Hire Freelancers

Create a PHP script that checks an IP address in different RBL lists

$30-5000 USD

进行中
已发布超过 11 年前

$30-5000 USD

货到付款
Create a PHP script that checks an IP address in different RBL lists The information is stored in a MySQL database. We want to run the script every hour with a cron job. Must run on php 5.3 The lookup of an IP in the rbl list is done with an NSlookup and the reverse dns example for IP [login to view URL] nslookup [login to view URL] see detailed information for full description and mySQL SQL dump. ## Deliverables The lookup of an IP in the rbl list is done with an NSlookup and the reverse dns example for IP [login to view URL] nslookup [login to view URL] result is ** server can't find [login to view URL]: NXDOMAIN This means IP is not on blacklist 2nd example for IP [login to view URL] nslookup [login to view URL] Address: [login to view URL] This means IP is on blacklist, depending on the rbl list the result will be somethink like 127.0.0.* The script \---|\---|\---|- The information is stored in a MySQL database. We want to run the script every hour with a cron job. 1/ first check the hour and take the hour (0 - 23) 2/ select clients from tbl_clients where runtime = hour 3/ for each of these clients: select IP addresses from tbl_ipaddress for these client 4/ for each IP find on which rbl list the were positive on last check from tbl_rblpositive (array) do the rbl check on each rbl server from tbl_rblservers where use = true update datetimelastchecked in tbl_ipaddress 5/ if a postive rbl is found: update datetimelastfound in tbl_ipaddress insert or update fields in tbl_rblpositive 6/ if an IP address is no longer positive remove it from tbl_rblpositive 7/ echo a list with new positives and list with removed positives 8/ make a status page where we place per client the list op IP addresses, Date and time last check, date time last blocked, number of blocks (# IP is on a different rbl list) see attached image RBL servers you can use to test [login to view URL] [login to view URL] [login to view URL] This is the MySQL DB (not final, you can change this if needed) /* MySQL Source Server Version: 5.0.96 Source Database: tsc_rblmon */ SET FOREIGN\_KEY\_CHECKS=0; \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| -- Table structure for \`tbl_clients\` \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| DROP TABLE IF EXISTS \`tbl_clients\`; CREATE TABLE \`tbl_clients\` ( \`type\` enum('deleted','active') default NULL, \`runtime\` enum('23','22','21','20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1','0') NOT NULL, \`name\` text NOT NULL, \`email\` text NOT NULL, \`clientid\` int(11) NOT NULL, PRIMARY KEY (\`clientid\`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| -- Table structure for \`tbl_ipaddress\` \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| DROP TABLE IF EXISTS \`tbl_ipaddress\`; CREATE TABLE \`tbl_ipaddress\` ( \`id\` int(10) NOT NULL, \`clientid\` int(10) NOT NULL, \`datetimelastfound\` datetime default NULL, \`datetimelastchecked\` datetime default NULL, \`IP\` char(15) NOT NULL, PRIMARY KEY (\`id\`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| -- Table structure for \`tbl_log\` \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| DROP TABLE IF EXISTS \`tbl_log\`; CREATE TABLE \`tbl_log\` ( \`id\` int(10) NOT NULL, \`datetimestartrun\` datetime NOT NULL, \`datetimeendrun\` datetime NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| -- Table structure for \`tbl_rblpositive\` \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| DROP TABLE IF EXISTS \`tbl_rblpositive\`; CREATE TABLE \`tbl_rblpositive\` ( \`id\` int(10) NOT NULL, \`ipid\` int(10) NOT NULL, \`rblserverid\` int(10) NOT NULL, \`dateimelastfound\` datetime NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| -- Table structure for \`tbl_rblservers\` \-- -|\---|\---|\---|\---|\---|\---|\---|\---|\---| DROP TABLE IF EXISTS \`tbl_rblservers\`; CREATE TABLE \`tbl_rblservers\` ( \`rblid\` int(3) NOT NULL, \`server\` text NOT NULL, \`use\` enum('false','true') NOT NULL, PRIMARY KEY (\`rblid\`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
项目 ID: 2676058

关于此项目

8提案
远程项目
活跃11 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

BELGIUM的国旗
Brugge, Belgium
5.0
36
会员自2月 4, 2008起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。