Search
 
SCRIPT & CODE EXAMPLE
 

PHP

if ip is php

if($_SERVER["REMOTE_ADDR"]=='111.111.111.111'){
//run only my ip
}
Comment

php ip

// Function to get the client IP address
function get_client_ip() {
    $ipaddress = '';
    if (getenv('HTTP_CLIENT_IP'))
        $ipaddress = getenv('HTTP_CLIENT_IP');
    else if(getenv('HTTP_X_FORWARDED_FOR'))
        $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
    else if(getenv('HTTP_X_FORWARDED'))
        $ipaddress = getenv('HTTP_X_FORWARDED');
    else if(getenv('HTTP_FORWARDED_FOR'))
        $ipaddress = getenv('HTTP_FORWARDED_FOR');
    else if(getenv('HTTP_FORWARDED'))
       $ipaddress = getenv('HTTP_FORWARDED');
    else if(getenv('REMOTE_ADDR'))
        $ipaddress = getenv('REMOTE_ADDR');
    else
        $ipaddress = 'UNKNOWN';
    return $ipaddress;
}
Comment

PREVIOUS NEXT
Code Example
Php :: Invalid route action: [AdminAppHttpControllersAdminOrdersController]. 
Php :: laravel helper function for check string is exist in another string 
Php :: laravel update single field 
Php :: Print exact sql statement executed 
Php :: return json response id name from eloquent all laravel 
Php :: laravel makehidden 
Php :: homebrew switch php 
Php :: php array of objects filter 
Php :: php explode by tab 
Php :: laravel date validation 
Php :: php curl ssl verify 
Php :: get all post meta 
Php :: how to fetch particular css file in wordpress 
Php :: behamin brequest installation on laravel 
Php :: php array exists key 
Php :: unique laravel migration 
Php :: php 7 count result in database 
Php :: php counting number of chars excluding newlines 
Php :: cast string to int php 
Php :: laravel check old password 
Php :: a backwards counting forloop 
Php :: php import function from another file 
Php :: install symfony in terminal 
Php :: check php version 
Php :: get image name and extension laravel 
Php :: valid number in excel php 
Php :: get file name from file path in php 
Php :: xendit callback 
Php :: xdebug vscode docker 
Php :: laravel download file from public folder 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =