addLink() (tick_24Validator Engine Only)

void addLink(int $flags[, string $linktype] [, string $attname] [, int $attindex] [, array or string $link]);

Add a link for link checking. Adds the link to the $links array and the link type to the $linkstypes array.

$flags

0 - set $flags to 0 for "auto" mode, which works in tag attribute and tag attribute value programs and assumes the value of the attribute being checked is the link to add; do not supply any optional parameters when setting $flags to 0

1 - supply the $attname parameter to add the attribute value of $attname for link checking

2 - supply the $linktype parameter to manually specify the link type, otherwise it is automatically generated (examples: "a href", "img src", etc.)

4 - add the attribute value of the current attribute being checked for link checking (use in attribute and attribute value programs only)

8 - supply the $attindex parameter to add the attribute value of the attribute with index $attindex for link checking

16 - supply the $link parameter (New v12.0030)

32 - when flag 16 is used, use this flag to indicate that $link already had character references converted to characters (New v12.0030)

64 - automatically expect a certain Internet media type (MIME type) based on the link being added (like a JavaScript media type if appears to be a link to a JavaScript document in a "script" element with a "src" attribute;  used by the link checker) (New v12.0033)

128 - expect a CSS Internet media type (MIME type) (used by the link checker) (New v14.01)

512 - expect an image Internet media type (MIME type) (used by the link checker) (New v14.01)

1024 - the link is content that is (or might be) loaded into the document (if flag 126 is enabled then using this flag checks for insecure content (via HTTP/FTP) in secure (via HTTPS) documents) (New v15.00)

2048 - expect an audio Internet media type (MIME type) (used by the link checker) (New v15.00)

4096 - expect a video Internet media type (MIME type) (used by the link checker) (New v15.00)

In v13.9910 and above, $link may be an array containing multiple links.

This function is supported only in CSE HTML Validator v11.0104 and later.