Base URL of web address
Posted: Sun Jan 06, 2013 4:52 am
I need to get the base URL of a web address, ie. the "http/https" + domain of any given address. But the GetURLPart() command doesn't have an easy way to get it.
In the code below, I want the output to return: https://mail.yahoo.com
But it returns only: mail.yahoo.com (which doesn't show if it's http or https).
So I have to resort to hacking my own:
So, a new parameter (maybe #PB_URL_Base?) would be great:
In the code below, I want the output to return: https://mail.yahoo.com
Code: Select all
Debug GetURLPart("https://mail.yahoo.com/login.css",#PB_URL_Site)

Code: Select all
Debug GetURLPart("https://mail.yahoo.com/login.css",#PB_URL_Protocol)+"://"+GetURLPart("https://mail.yahoo.com/login.css",#PB_URL_Site)
Code: Select all
Debug GetURLPart("https://mail.yahoo.com/login.css",#PB_URL_Base)