I find that John's suggestion works, like this:
Code:
<a href="?click=yes" target="_blank">
but it just creates a new tab in FF each time (I think there is a way to specify that the new window be a smaller popup, if that's what you want).
Edit: so you want a different site to open in a new window? This seems to work for me:
Code:
<?php
if(!file_exists('counter.txt')){
file_put_contents('counter.txt', '0');
}
if($_GET['click'] == 'yes'){
file_put_contents('counter.txt', ((int) file_get_contents('counter.txt')) + 1);
header('Location: http://www.google.com');
die;
}
?>
<head>
<title>counter example</title>
</head>
<body>
<a href="?click=yes" target="_blank">Click</a>
</body>
</html>