/**
  * Returns true if we are running windows.
  *
  * @return True if we are running windows, false otherwise.
  * @static
  */
 function isLinux()
 {
     $os = OsDetect::getOsString();
     if (eregi("linux", $os)) {
         return true;
     } else {
         return false;
     }
 }
示例#2
0
 /**
  * Static function that detects wether we're running windows or not and then either uses the native version of
  * getmxrr or the alternative one. See getmxrr_windows below for more information.
  *
  * @param hostname The host for which we want to get the mx records.
  * @param mxhosts The array we are going to fill with the mx records.
  * @return Returns either true or false.
  * @static
  */
 function getmxrr($hostname, &$mxhosts)
 {
     if (OsDetect::isWindows()) {
         // call the alternative version
         return Dns::getmxrr_windows($hostname, $mxhosts);
     } else {
         // use the native version
         return getmxrr($hostname, $mxhosts);
     }
 }