Function __global->check_url_exists

Definitions

sources/urls2.php

  • Check to see if a URL exists.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$url URLPATH No No required parameter N/A N/A The URL to check
$test_freq_secs ?integer No No Null N/A N/A Cache must be newer than this many seconds (null: default of 31 days)
$retry_on_failed boolean No No True N/A N/A Whether to automatic retry if previously failed, rather than trusting that previous result
$attempts integer No No 1 N/A N/A Number of times to attempt before considering failing this time
&$message string Yes No Blank (empty string) N/A N/A HTTP response code, returned by reference
&$destination_url string Yes No Blank (empty string) N/A N/A HTTP destination URL

Returns

  • Whether it does
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check to see if a URL exists.
 *
 * @param  URLPATH $url The URL to check
 * @param  ?integer $test_freq_secs Cache must be newer than this many seconds (null: default of 31 days)
 * @param  boolean $retry_on_failed Whether to automatic retry if previously failed, rather than trusting that previous result
 * @param  integer $attempts Number of times to attempt before considering failing this time
 * @param  string $message HTTP response code, returned by reference
 * @param  string $destination_url HTTP destination URL
 * @return boolean Whether it does
 */

function check_url_exists(string $url, ?int $test_freq_secs = null, bool $retry_on_failed = true, int $attempts = 1, string &$message = '', string &$destination_url = '') : bool