PHP – Show OS, PC and Host Name

May 13th, 2012 by Laeeq | 1 comment

Here is a simple php code that will show your Operating System, Computer, and Host name.

Example Code:

  1. <?php
  2. echo php_uname(‘s’).”
  3. “;
  4. echo php_uname(‘n’).”
  5. “;
  6. echo gethostbyaddr($_SERVER['REMOTE_ADDR']);
  7. ?>

You can subscribe to PHPZAG.COM posts by Email

 

Related Topics:

  • Wrapping Text using PHP
  • PHP 5.5 beta 4 is now available
  • Swapping Array Keys and Values
  • PHP Security
  • Working with Image Metadata in PHP
  • Converting Between Relative and Absolute File Path
  • Parsing File Paths with PHP
  • How to remove HTML Comments with PHP?
  • How to access .htaccess values?
  • Dealing With Common PHP Errors
  • Interview Questions and Answers for Freshers
  • Display numbers with ordinal suffix using PHP
  • Function to set COLLATION on database fields of Mysql
  • Read and write to remote files using PHP
  • Sharing PHP SESSION Variables between Multiple Subdomains
  • PHP 5.5.0 Alpha4 Development Preview Released
  • Check a string starts with http using PHP
  • Cross-Site Scripting Attacks (XSS)
  • PHP 5.4.11 and PHP 5.3.21 released!
  • PHP Memory Leak Issue
  •  

     

    1. free bets offers
      December 10th, 2012 at 07:28 | #1

      great . Thanks for informations . Ill be back. Thanks once again

    1. No trackbacks yet.