BAN IP RANGE PHP SCRIPT (basic version)

Закрито Опубліковано %project.relative_time Оплачується при отриманні
Закрито Оплачується при отриманні

Hello,

I try to ban the following IP RANGES from my [login to view URL] page but they still enter my webpage. Those IPS are still tracked by statcounter (personal counteR) even when added at the end of my [login to view URL] page despite that the code below is at the TOP of the web page.

Also, I need you to adjust the script below so I can define different redirection URLS for different IP ranges in same PHP code below. I will pay $30 for this easy job + great feedback if it works.

Script to edit/modify:

-----------------

<?php

ob_start();

/*

edit the $ip_range bellow to add or remove IP ranges you want to ban.

If you want to ban IP ranges (1 to 3rd digit of IPv4 format prepend last digit with a dot)

All array values must be enclosed in single quotes and separated by comma

*/

$ip_range = array('173.239.', '205.185.', '216.151.', '209.197.');

/*

Edit bellow the URL where the banned visitor will be redirected.

Values must be enclosed in single or double quotes

*/

$redirect_uri = '[login to view URL]';

/*

Functionality bellow

*/

foreach ($ip_range as $key => $value) {

if (strstr($_SERVER['REMOTE_ADDR'], $value)) {

header('Location:' . $redirect_uri);

}

}

ob_end_flush();

?>

-----------------

I look foward to hearing from you!

Thanks

Note: I don't need any admin area or whatever. I will edit the code myself from the [login to view URL] file.

Графічний дизайн HTML PHP Веб-дизайн

ID Проекту: #13998843

Про проект

15 заявок(-ки) Дистанційний проект Остання активність 6 роки(ів) тому

15 фрілансерів(-и) готові виконати цю роботу у середньому за $31

neoconcepts

Hi, i am an expert in website designing and I can Develop sites in Wordpress, Magento and Core PHP, API. let's discuss. ready to start. thanks.

$40 USD за 5 дні(-в)
(189 відгуків(и))
7.6
Max01

we need to use regular exp for this

$30 USD за 1 день
(370 відгуків(и))
7.4
dkokmadis

A proposal has not yet been provided

$30 USD за 1 день
(374 відгуків(и))
7.2
cijagani

Thanks for providing me opportunity to place bid over the project and communicate with you. i have a lots of experience in PHP MVC,MySQL, Wordpress, Codeigniter, laravel and Web Designing. my aim to deliver quality pr Більше

$29 USD за 1 день
(154 відгуків(и))
7.1
aanvikm

Could you please share some more details and I should be able to help you here. Thanks Aanvik Consulting

$55 USD за 1 день
(46 відгуків(и))
6.9
cestis

A proposal has not yet been provided

$50 USD за 1 день
(86 відгуків(и))
5.8
amjadali4888

Greetings I have read your job description and I want to talk about more that regards that I can do that project within the time frame I have more than 3 years’ experience in web development skills like PHP WordPre Більше

$25 USD за 1 день
(123 відгуків(и))
5.6
GlobalSite2

I will give you code to block ip range it will not done with php. if we done with php they will be track by statcounter . come to chat i will give you solution waiting for your response thanks

$30 USD за 1 день
(20 відгуків(и))
4.8
gagandeeps416

Hello, I will give you the code which will block the ip list. It will be fully tested code and you can easily add more ips to it. PLease contact me i will start immediately. Regards Gagandip Singh

$28 USD за 1 день
(26 відгуків(и))
4.6
travler7282vw

Hello, I understand you would like to have a php script written that blocks ranges of IP addresses and also redirects based on ranges on IP addresses. I have over 17 years experience in networking, programming, and co Більше

$28 USD за 2 дні(-в)
(7 відгуків(и))
4.6
NurulKadir

Hi Dear, if these ips are blocked with different technique does it server your purpose? need to know detail requirement. can we have chat for further proceed? Thanks

$25 USD за 1 день
(7 відгуків(и))
4.2
pselina79

Hello, I can make BAN IP RANGE PHP SCRIPT with basic version. You can hire me and i won't disappoint you. Have a nice day. Regards, Selina

$17 USD за 2 дні(-в)
(2 відгуків(и))
2.1