Following PHP code will display User LAN ip in browser. For example
You can use below code. Simply create new file name ip.php and paste the below code. then copy it your web server folder.
<?php $img_number = imagecreate(275,25); $backcolor = imagecolorallocate($img_number,102,102,153); $textcolor = imagecolorallocate($img_number,255,255,255); imagefill($img_number,0,0,$backcolor); $number = " Your IP is $_SERVER[REMOTE_ADDR]"; Imagestring($img_number,10,5,5,$number,$textcolor); header("Content-type: image/jpeg"); imagejpeg($img_number); ?>
You can link it with your main index (to display ip in your main HTML page using below code.
<img src=http://linux/ip.php border=”1″ width="275" height="25">
You can also set this page as Default Start up Page in IE via using AD GPD (If you are using AD DOMAIN environment)
Regard’s
Syed Jahanzaib