Android Question Un-Mask A URL

MODERN TALKING

Active Member
Licensed User
Longtime User
URL Masking
means that the visitors to the domain name will be forwarded to your destination website, however the URL in their browser address bar will remain the same. Also known as Stealth Redirection or URL Hiding, this will ensure that your visitors see the original domain name and not the destination URL.

https://blog.clickmeter.com/link-cloaking-vs-url-masking

Guys, is there any way to get the Masked URL from the current page?

Reward due to the kind soul who can help me solve this vexing problem

Danke!
 

MODERN TALKING

Active Member
Licensed User
Longtime User
Stumbled upon this:

'HTTP_HOST' - shows the frame url
"SERVER_NAME" - shows the file's server name

So if the file is on xyz.com - "SERVER_NAME" will show xyz.com
If you execute "SERVER_NAME" on abc.com - it will show abc.com

There are many ways to keep the abc.com in xyz.com - like QueryString

How to implement in B4A?
 
Upvote 0

MODERN TALKING

Active Member
Licensed User
Longtime User
Thank you Erel - yup, there is an iFrame which contains what 'seems' to be a URL but with lotsa extra digits and doesn't load

Is there ANY way to get the "real" URL?
 
Upvote 0

MODERN TALKING

Active Member
Licensed User
Longtime User
Hi Erel,

A VERY sensitive Government Website in Asia - too afraid to post it anywhere :oops:

I try Roycefer's method he posted - if not working, then I find a similar Website to the one I'm dealing with

Thank you so much for offering to help

You are DA MAN and we all LOVE YOU Erel :)
 
Upvote 0

MODERN TALKING

Active Member
Licensed User
Longtime User
I can access Pornhub - NOT THAT I WANT TO, just an example

Not a nerdy, geeky, pimply-faced perverted masturbator in my parent's basement - HIHIHI

What I meant was to get the Government Website URL which shows the Warning Message if I try to access Pornhub - for example
 
Upvote 0

MODERN TALKING

Active Member
Licensed User
Longtime User
The solution 'seems' to be this:

Yes, accessing parent page's URL is not allowed if the iframe and the main page are not in the same (sub)domain. However, if you just need the URL of the main page (i.e. the browser URL), you can try this:

B4X:
var url =(window.location != window.parent.location)? document.referrer
: document.location.href;

I was struggling with the same issue and got this solution from an other source. Worked for me.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
overhere they block certain casino sites that don't have a license.

it happends at dns level so you simply can't bypass it.
 
Upvote 0

MODERN TALKING

Active Member
Licensed User
Longtime User
1. Enter URL to Main Page
2. Navigate to other Pages on Same Website
3. New Page loads BUT URL does NOT CHANGE - Masked
4. Need the REAL URL of this New Page on Same Website
 
Upvote 0
Top