setup mac os x (lion) as development machine ( macports: apache + mysql + php + subversion )

Here are the instructions to setup Mac OS X ( Lion ) for MAMP software development. Basically you will need apache, mysql, php, subversion and may be phpmyadmin. I am using macports which simplifies the installation process. 1. Install Xcode from apple’s Mac app store. It might take a while because mac app store is ...

Detecting OS in PHP

Simply echo PHP_OS; It will print: For Mac: Darwin For Windows Visat: WinNT For Ubuntu: Linux Also if you want to know OS details about users accessing your site, you can use $_SERVER[‘HTTP_USER_AGENT’]