Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

check if host is local in php

$whitelist = array(
    '127.0.0.1',
    '::1'
);

if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){
    // not valid
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #host #local #php
ADD COMMENT
Topic
Name
2+5 =