@@ 369-378 (lines=10) @@ | ||
366 | } |
|
367 | ||
368 | // Check whether we tried the host before |
|
369 | if (isset($this->slowHosts[$urlParts['host']])) { |
|
370 | return [ |
|
371 | false, |
|
372 | $redirectCount, |
|
373 | sprintf( |
|
374 | $PMF_LANG['ad_linkcheck_openurl_tooslow'], |
|
375 | Strings::htmlspecialchars($urlParts['host']) |
|
376 | ), |
|
377 | ]; |
|
378 | } |
|
379 | ||
380 | // Check whether the hostname exists |
|
381 | if (gethostbynamel($urlParts['host']) === false) { |
|
@@ 405-417 (lines=13) @@ | ||
402 | ||
403 | $fp = @fsockopen($_host, $urlParts['port'], $errno, $errstr, self::LINKVERIFIER_CONNECT_TIMEOUT); |
|
404 | ||
405 | if (!$fp) { |
|
406 | // mark this host too slow to verify |
|
407 | $this->slowHosts[$urlParts['host']] = true; |
|
408 | ||
409 | return [ |
|
410 | false, |
|
411 | $redirectCount, |
|
412 | sprintf( |
|
413 | $PMF_LANG['ad_linkcheck_openurl_tooslow'], |
|
414 | Strings::htmlspecialchars($urlParts['host']) |
|
415 | ), |
|
416 | ]; |
|
417 | } |
|
418 | ||
419 | // wait for data with timeout (default: 10secs) |
|
420 | stream_set_timeout($fp, self::LINKVERIFIER_RESPONSE_TIMEOUT, 0); |