Drupal Shurly before redirect
With a quick glance at the shurly code, I'd think this should work:

function yourmodule_shurly_redirect_before(&amp;$redirect) {
  $redirect-&gt;destination = 'path/to/advert?somevar='. $redirect-&gt;destination; 
}


And then you need to set up your advertisement page as path/to/advert and have it redirect to $_GET['somevar'] after the timeout.