PHP

PHP : การเขียน CODE แสดง IP Address ของเครื่องที่เปิดหน้า WebSite

===============================

<?php
echo 'Your IP is&nbsp;: <i>'.$_SERVER["REMOTE_ADDR"].'</i><br/>
Your browser identifies itself as&nbsp;: <i>'.$_SERVER["HTTP_USER_AGENT"].'</i>';
?>

===============================

การแสดงผลเมื่อนำไปรัน

Your IP is : 58.24.30.30
Your browser identifies itself as : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2)

Recommend