You are here

function elf_get_redirect_url in External Links Filter 7.3

Creates a safe internal URL that redirects to the an external one.

Parameters

string $external_url: The target URL.

Return value

string An internal URL that points to the ELF redirection route.

2 calls to elf_get_redirect_url()
elf_redirect in ./elf.module
Redirect the browser to the external URL from $_GET['url'].
elf_replace in ./elf.module
Hook_filter_info() process callback.

File

./elf.module, line 233
Adds an icon to external and mailto links.

Code

function elf_get_redirect_url($external_url) {
  $key = drupal_hmac_base64($external_url, drupal_get_private_key());
  return url('elf/go', array(
    'query' => array(
      'url' => $external_url,
      'key' => $key,
    ),
  ));
}