[Solved] How to see who access my ip address from web service via wifi [closed]


to find informations about visitor request , please check you xampp apache log file .

here is the code you can add in your index.php to deny access for some adress ip :

<?php
    $deny = array("111.111.111", "222.222.222", "333.333.333");
    if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
       header("location: http://www.google.com/");
       exit();
    } ?>

add the adress ip in $deny array for machine that you won’t them to access your project .

in that example , every user that is denied to access , will be redirecting to google .

think to create another page as the forbidden page (forbidden.php) to render your visitors if there are denied to this page .

another way to deny visitors is using .htaccess .

1-go to /htdocs/test/
2-create a file nammed .htaccess (with dot in the beginning)
3- add this code to the file (.htaccess)

Order Deny,Allow
Deny from all
Allow from 192.168.1.1/24

the adress 192.168.1.1/24 must match your network adress . you can check it in your terminal by typing ipconfig .
hope that help you

10

solved How to see who access my ip address from web service via wifi [closed]