php - How to change the domain of url that the browser is showing in download page -


i have script used download files website, on downloading page of browser, shows url of sender.

if file downloading http://localhost/w/download.zip shows same url, want give fake domain or url, http://www.example.com/download.zip.

means want change url or domain browser reporting download from. know can done

<a href="download.php?d=<?php echo $_get['d']; ?>" target="_blank">download!</a>  

but not change domain. , shows me link domain.

question : how do that?

if want show different url user when hovers mouse over, use javascript it, google similar. here's simple example:

<a href="https://www.google.com/" onclick="location.href='https://www.facebook.com/';return false;">google?</a> 

the browser show google.com when hovering on link, when clicked, javascript redirects facebook.com , cancels default behaviour.

note won't work if javascript disabled in user's browser (very few cases nonetheless).

demo: http://output.jsbin.com/pehehorune


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -