3 // @TODO Add some DNS caching here
6 if ($helperInstance->isProxyUsed() === true) {
7 // Resolve hostname into IP address
8 $ip = ConsoleTools::resolveIpAddress($helperInstance->getConfigInstance()->getConfigEntry('proxy_host'));
10 // @TODO Handle $ip = false
12 // Connect to host through proxy connection
13 $socketResource = fsockopen($ip, $helperInstance->getConfigInstance()->getConfigEntry('proxy_port'), $errorNo, $errorStr, 30);
15 // Connect to host directly
16 $socketResource = fsockopen('188.138.90.169', 80, $errorNo, $errorStr, 30);
19 // Check if there was an error else
22 throw new InvalidSocketException(array($helperInstance, $socketResource, $errorNo, $errorStr), BaseListener::EXCEPTION_INVALID_SOCKET);