开发者

How to open a webpage on the same tab after redirecting from a link

开发者 https://www.devze.com 2023-03-18 21:53 出处:网络
I am developing a website in which i need to open a HTML page and after a clicked by a user on a link. It will redirect at somewhere. But what i want to open an another link after this redirection wit

I am developing a website in which i need to open a HTML page and after a clicked by a user on a link. It will redirect at somewhere. But what i want to open an another link after this redirection within same 开发者_Python百科tab.

For example : I am on my 4shared.com account and when i click on a link to download something. after successfully redirect of that download link. It will automatically open an another link with in same page.

Thanks in advance


Use php.

Lets say that I click on a download link. It would most probably bring me to a download.php page. It could download the file and then use an if statement (excuse my bad syntax, I usually do bash and C):

<?php
// download code, or any other code
if (file is downloaded) {
header( 'Location: http://url.of.target' ) ;
} else {
// do nothing and continue downloading
}
?>

0

精彩评论

暂无评论...
验证码 换一张
取 消