Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check if host is local in php

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

if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){
    // not valid
}
Comment

PREVIOUS NEXT
Code Example
Php :: php include 
Php :: if else if php code reflect 
Php :: ubuntu apache php version 
Php :: laravel passport vue 401 Unauthorized 
Php :: get current day php 
Php :: firebase php 
Php :: laravel route match 
Php :: show images laravel 8 showJobImage($filename) 
Php :: what does defined do in php 
Php :: same column in and where laravel query 
Php :: update image in database using php 
Php :: recursive binary search php 
Php :: while true php 
Php :: How To Check If A String Ends With Another String In PHP 
Php :: carbon create from format 
Php :: last_insert_id() php 
Php :: php octal to decimal 
Php :: laravel migrations rename table 
Php :: h:i:s explode in php by ":" 
Php :: how to call php function from ajax 
Php :: phpunit test private function 
Php :: laravel tinker hash password 
Php :: substract two datetime and get the different hours and minutes php 
Php :: fillable property to allow mass assignment 
Php :: {{count laravel 
Php :: get redirect url for laravel socialite with api 
Php :: wordpress autoload composer 
Php :: get_adjacent_post wordpress 
Php :: update checkbox value in laravel 
Php :: livewire call another component 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =