|
|
|
0
wizard04
Functions for validating, parsing, and normalizing URIs and their parts.
If you find any errors, please leave a comment.
parseURI(str) splits a URI into its parts
parseQueryNumeric(str) splits a query string into its name/value pairs; returns a 2-D array
parseQueryAssociative(str) splits a query string into its name/value pairs; returns an associative array
parseURL(str) splits a URL (i.e., http(s) scheme URI) into its parts
normalizeURLDomain(domain) converts an obscured URL domain to a more readable one
normalizeIPv4(ip) normalizes an IPv4 address
normalizeIPv6(ip) normalizes an IPv6 address
normalizeURLPath(path) converts an obscured URL path to a more readable one
parseMailto(str) splits a mailto scheme URI into its parts
normalizeEmailAddress(str) converts an obscured email address to a more readable one; unfolds and removes comments
fixURL(str, domain) attempts to fix a URL if needed
fixHyperlink(str, domain, allowMailto) attempts to fix a hyperlink address (http(s) or mailto) if needed
For URLs, note that IPvFuture addresses are not supported.
If you find any errors, please leave a comment.
parseURI(str) splits a URI into its parts
parseQueryNumeric(str) splits a query string into its name/value pairs; returns a 2-D array
parseQueryAssociative(str) splits a query string into its name/value pairs; returns an associative array
parseURL(str) splits a URL (i.e., http(s) scheme URI) into its parts
normalizeURLDomain(domain) converts an obscured URL domain to a more readable one
normalizeIPv4(ip) normalizes an IPv4 address
normalizeIPv6(ip) normalizes an IPv6 address
normalizeURLPath(path) converts an obscured URL path to a more readable one
parseMailto(str) splits a mailto scheme URI into its parts
normalizeEmailAddress(str) converts an obscured email address to a more readable one; unfolds and removes comments
fixURL(str, domain) attempts to fix a URL if needed
fixHyperlink(str, domain, allowMailto) attempts to fix a hyperlink address (http(s) or mailto) if needed
For URLs, note that IPvFuture addresses are not supported.
2
Cloudgen
The regular expression include the following:
Local part include (at least 2 characters):
1. Uppercase and lowercase English letters (a-z, A-Z)
2. Digits 0 through 9
3. Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
4. Character . (dot) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively.
Top Level Domains include:
1. country-code top-level domains (ISO 3166)
2. generic top-level domains
3. sponsored top-level domains
4. infrastructure top-level domain
Detailed Discussion will be found: The regular expression for checking email
Local part include (at least 2 characters):
1. Uppercase and lowercase English letters (a-z, A-Z)
2. Digits 0 through 9
3. Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
4. Character . (dot) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively.
Top Level Domains include:
1. country-code top-level domains (ISO 3166)
2. generic top-level domains
3. sponsored top-level domains
4. infrastructure top-level domain
Detailed Discussion will be found: The regular expression for checking email
7
This small snippet will not allow _POST requests from a 'foreign' domain. It relies on the HTTP_REFERER variable.
4
function to remove a computer from a domai
3
Get the computer domain with wmi
5
check if a string is a valid domain ex.: dsc-services.be







