$ipResolved = gethostbyname($hostname);
// Was it fine?
- if (($ipResolved !== false) && ($ipResolved != $hostname)) {
+ if (($ipResolved !== FALSE) && ($ipResolved != $hostname)) {
// Okay, this works!
$ip = $ipResolved;
// @TODO Add some DNS caching here
// Open connection
- if ($helperInstance->isProxyUsed() === true) {
+ if ($helperInstance->isProxyUsed() === TRUE) {
// Resolve hostname into IP address
$ip = $helperInstance->resolveIpAddress($helperInstance->getConfigInstance()->getConfigEntry('proxy_host'));
} // END - if
// Prepare the GET request
- $request = 'GET ' . ($helperInstance->isProxyUsed() === true ? 'http://ship-simu.org' : '') . '/ip.php HTTP/1.0' . self::HTTP_EOL;
+ $request = 'GET ' . ($helperInstance->isProxyUsed() === TRUE ? 'http://ship-simu.org' : '') . '/ip.php HTTP/1.0' . self::HTTP_EOL;
$request .= 'Host: ship-simu.org' . self::HTTP_EOL;
$request .= 'User-Agent: ' . self::HTTP_USER_AGENT . self::HTTP_EOL;
$request .= 'Connection: close' . self::HTTP_EOL;
// Do we use proxy?
- if ($helperInstance->isProxyUsed() === true) {
+ if ($helperInstance->isProxyUsed() === TRUE) {
// CONNECT method?
if ($helperInstance->getConfigInstance()->getConfigEntry('proxy_connect_method') == 'Y') {
// Setup proxy tunnel