This function is called after an HTTP or HTTPS link has been checked and its link status is now set. (New v12.0104)

NOTE: This function only affects HTTP and HTTPS links.

$olc_comment - the link check comment (can be changed)

$olc_lasturl - the full URL of the last effective URL after any redirects (can't be changed)

$olc_statusint - the link status as an integer (1 - not checked, 2 - OK, 3 - bad, 4 - warning) (can be changed)

$olc_statusstring - the link status as an string (can be changed)

Example 1:

This example sets links that contain a certain string to be an error. Some servers return a '404 page' but do not actually return the proper 404 HTTP status code.

function onLinkChecked_HTTP() {
 if stripos($olc_lasturl,'404-page.php')>=0 {
  $olc_statusint=3; // set as bad link
  $olc_statusstring='[404 page]';