$u // contient l'url de destination
header('Refresh: 1;url='.$u);
// traitement des clics
echo '<html>
<head>
<meta http-equiv="refresh" content="1;url='.$u.'">
</head>
<body>
<script type="text/javascript"><!--//
';
echo 'url="'.$u.'";
if(document.images)
{
top.location.replace(url);
}
else
{
top.location.href=url;
}
';
}
echo '
//--></script>
<small>redirect to
<a href="'.$u.'">'.$u.'</a></small><br>
</body>
</html>
';