GuzzleHttpis_host_in_noproxy

Returns true if the provided host matches any of the no proxy areas.

Description

GuzzleHttp\is_host_in_noproxy( (string) $host, (array) array $noProxyArray ); 

This method will strip a port from the host if it is present. Each pattern can be matched with an exact match (e.g., foo.com == foo.com ) or a partial match: (e.g., foo.com == baz.foo.com and .foo.com. == baz.foo.com, but .foo.com. != foo.com ).

Areas are matched in the following cases: 1. * (without quotes) always matches any hosts. 2. An exact match. 3. The area starts with . and the area is the last part of the host. e.g.

Parameters (2)

0. $host (string)
Host to check against the patterns.
1. $noproxyarray (array) => array $noProxyArray
An array of host patterns.

Usage

  1. if ( !function_exists( 'GuzzleHttp\is_host_in_noproxy' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/functions.php'; 
  3.  
  4. // Host to check against the patterns. 
  5. $host = ''; 
  6.  
  7. // An array of host patterns. 
  8. $noproxyarray = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = GuzzleHttp\is_host_in_noproxy($host, $noproxyarray); 
  12.  

Defined (1)

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

/lib/Azure/GuzzleHttp/functions.php