Drupal Shurly before redirect I want  create to something like adf.ly script with Drupal. I am using shurly (developed by Jeff Robins) for URL shortening, and it works fine, but I want to display an advertising page for 10 seconds before redirecting to the final URL, which is not a feature provided by this module. 

It has a hook called hook_shurly_redirect_before() which may help me, but I don't have enough knowledge to use it.

Can anyone explain how I should use this hook?
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.