开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜