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