display ip address
2 posts
Page 1 of 1
hello guys
i just wanted to share this
live - http://shimsoftwares.com/ip.php
i just wanted to share this
Code: Select all
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip;
?>
live - http://shimsoftwares.com/ip.php
Find my programs on Softpedia
If your application is usable in both SSH and on the web, you can use
Code: Select all
<?php
if(PHP_SAPI){
$ip = explode(" ",$_SERVER['SSH_CONNECTION']);
$ip = $ip[0];
}else{
$ip = $_SERVER['REMOTE_ADDR'];
}
?>
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023