original_string: private function chooseHost()
  	{
  		$random_a = $this->api_hosts;
  		shuffle($random_a); // pick random host
  		
  		foreach( $random_a as $api_url )
  		{
              $this->msg( "chooseHost() - Testing: $api_url ");
              
  			$content = @file_get_contents( $api_url );
  			if ( empty( $content ) )
  			{
  
                  $this->msg( $content );
  				// Failed
                  $this->msg( "- Ignoring failed API URL: $api_url " );
  				//print_r( $http_response_header );
  			}else{
  				$this->api_url = $api_url;
  				$this->msg( "- Working API URL: $api_url" );
  				return true;
  				 
  			}
              $this->msg( $content );
  		}
  		
  		return false;
  	}
code: private function chooseHost()
  	{
  		$random_a = $this->api_hosts;
  		shuffle($random_a); // pick random host
  		
  		foreach( $random_a as $api_url )
  		{
              $this->msg( "chooseHost() - Testing: $api_url ");
              
  			$content = @file_get_contents( $api_url );
  			if ( empty( $content ) )
  			{
  
                  $this->msg( $content );
  				// Failed
                  $this->msg( "- Ignoring failed API URL: $api_url " );
  				//print_r( $http_response_header );
  			}else{
  				$this->api_url = $api_url;
  				$this->msg( "- Working API URL: $api_url" );
  				return true;
  				 
  			}
              $this->msg( $content );
  		}
  		
  		return false;
  	}
code_tokens: private function chooseHost ( ) { $ random_a = $ this -> api_hosts ; shuffle ( $ random_a ) ; // pick random host foreach ( $ random_a as $ api_url ) { $ this -> msg ( "chooseHost() - Testing: $api_url " ) ; $ content = @ file_get_contents ( $ api_url ) ; if ( empty ( $ content ) ) { $ this -> msg ( $ content ) ; // Failed $ this -> msg ( "- Ignoring failed API URL: $api_url " ) ; //print_r( $http_response_header ); } else { $ this -> api_url = $ api_url ; $ this -> msg ( "- Working API URL: $api_url" ) ; return true ; } $ this -> msg ( $ content ) ; } return false ; }
docstring: find working host
docstring_tokens: find working host