Performs rudimentary parsing of a URL.
#Include <WinAPIEx.au3>
_WinAPI_ParseURL ( $sUrl )
$sUrl | The URL to be parsed. |
Success | The array containing the following information: |
[0] | The protocol part of the URL. |
[1] | The section of the URL that follows the protocol and colon (":"). |
[2] | The URL scheme (one of the $URL_SCHEME_* constants). |
Failure | Empty string and sets the @error flag to non-zero, @extended flag may contain the system error code. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Data = _WinAPI_ParseURL('http://www.microsoft.com')
ConsoleWrite('Protocol: ' & $Data[0] & @CR)
ConsoleWrite('Suffix: ' & $Data[1] & @CR)
ConsoleWrite('Scheme: ' & $Data[2] & @CR)