gmb_get_host

Get user host.

Description

gmb_get_host(); 

Returns the webhost this site is using if possible


Usage

  1. if ( !function_exists( 'gmb_get_host' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'maps-builder/vendor/wordimpress/maps-builder-core/includes/misc-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gmb_get_host(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/vendor/wordimpress/maps-builder-core/includes/misc-functions.php  
  1. function gmb_get_host() { 
  2. $host = false; 
  3.  
  4. if ( defined( 'WPE_APIKEY' ) ) { 
  5. $host = 'WP Engine'; 
  6. } elseif ( defined( 'PAGELYBIN' ) ) { 
  7. $host = 'Pagely'; 
  8. } elseif ( DB_HOST == 'localhost:/tmp/mysql5.sock' ) { 
  9. $host = 'ICDSoft'; 
  10. } elseif ( DB_HOST == 'mysqlv5' ) { 
  11. $host = 'NetworkSolutions'; 
  12. } elseif ( strpos( DB_HOST, 'ipagemysql.com' ) !== false ) { 
  13. $host = 'iPage'; 
  14. } elseif ( strpos( DB_HOST, 'ipowermysql.com' ) !== false ) { 
  15. $host = 'IPower'; 
  16. } elseif ( strpos( DB_HOST, '.gridserver.com' ) !== false ) { 
  17. $host = 'MediaTemple Grid'; 
  18. } elseif ( strpos( DB_HOST, '.pair.com' ) !== false ) { 
  19. $host = 'pair Networks'; 
  20. } elseif ( strpos( DB_HOST, '.stabletransit.com' ) !== false ) { 
  21. $host = 'Rackspace Cloud'; 
  22. } elseif ( strpos( DB_HOST, '.sysfix.eu' ) !== false ) { 
  23. $host = 'SysFix.eu Power Hosting'; 
  24. } elseif ( strpos( $_SERVER['SERVER_NAME'], 'Flywheel' ) !== false ) { 
  25. $host = 'Flywheel'; 
  26. } else { 
  27. // Adding a general fallback for data gathering 
  28. $host = 'DBH: ' . DB_HOST . ', SRV: ' . $_SERVER['SERVER_NAME']; 
  29.  
  30. return $host;