ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
URLExtractPath (Function)
In french: URLExtraitChemin
Returns the different elements of a URL: protocol, user, password, domain, port, resource path, resource name, resource extension, request and fragment.
Example
// Retrieve the full path of the URL resource
Resource = URLExtractPath(...
"http://user1:userpwd1@www.site.com:80/images/image.gif", ...
urlResourcePath + urlResourceName + urlResourceExtension)
// Resource = "/images/image.gif"
// Retrieve the server address
lsServer = URLExtractPath(...
"http://user1:userpwd1@www.site.com:80/images/image.gif", ...
urlProtocol + urlDomain + urlPort)
// lsServer = "http://www.site.com:80"
// Check if the address responds
// httpRequest(lsServer)
Syntax
<Result> = URLExtractPath(<URL> , <Section to extract>)
<Result>: Character string
  • Requested URL section.
  • Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant.
<URL>: Character string
Full or relative URL to use.
<Section to extract>: Integer constant (or combination of constants)
URL section to extract:
urlDomainDomain of the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "www.site.com".
urlFragmentFragment of the URL (anchor in a document).
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "part1".
urlPasswordUser password in the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "userpwd1".
urlPortPort of the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "80".
urlProtocolProtocol of the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "http".
urlRequestRequest of the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "id=5".
urlResourceExtensionExtension of the resource in the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to ".htm".
urlResourceNameName of the URL resource.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "page1".
urlResourcePathPath of the URL resource.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "/pages/".
urlUserUsername in the URL.
Example: in the following URL "http://user1:userpwd1@www.site.com:80/pages/page1.htm?id=5#part1", corresponds to "user1".
Business / UI classification: Business Logic
Component: wd290std.dll
See also
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/25/2022

Send a report | Local help