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 :: php does property exist 
Php :: php add hours to current date 
Php :: php check whether the url is http or https 
Php :: php generate random alphanumeric string 
Php :: laravel $loop-iteration 
Php :: laravel has table 
Php :: image dimension when uploading in laravel validation 
Php :: acf link 
Php :: illuminate database queryexception could not find driver laravel 9 
Php :: remove http / https from link php 
Php :: wp mail 
Php :: enie letter validation laravel regex 
Php :: php directory exists 
Php :: blade loop last 
Php :: laravel migration remove column 
Php :: random color php 
Php :: sleep microseconds php 
Php :: error log array 
Php :: phpmailer add reply to 
Php :: laravel test assert redirecto to 
Php :: get taxonomy name in singhle post 
Php :: determine special characters in php 
Php :: laravel session has message 
Php :: for loop in php 
Php :: laravel csrf-token in view 
Php :: laravel time format 
Php :: install php7.4 linux 
Php :: get yesterday date in php 
Php :: php check if json 
Php :: php exit foreach 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =