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
Reblogged this on SHERY's BLOG ON COMPUTER NETWORKING/I.T TIPS and commented:
Very Cool Post by Sir Jahanzaib. Enjoy…. Sorry for my own articles for some days due to very busy and tough routine of mine.
LikeLike
Comment by Shery — April 20, 2012 @ 6:08 PM
Sir its really cool and unique article, reblogged at my blog. Many times my users ask to know their IPs, its very handy option. thnx
LikeLike
Comment by Shery — April 20, 2012 @ 6:14 PM
very useful
LikeLike
Comment by sarfarazqadry2008 — July 10, 2012 @ 2:33 PM