well you havent mentioned what type of CMS you are planning to integrate it into, but:

http://www.besthostingforums.com/showthread.php?t=23086

and also: http://hotfile.com/dl/25151679/405f355/divert.rar.html

OR (same thing, just in source format)

Code: 
<?php
$ref = $_GET["ref"];
?>
<html>
<head>
<title>Redirecting...</title>
<META http-equiv="refresh" content="2;URL=<?php echo $ref;?>">
<style type="text/css">
    html {
        background: #fff;
    }
    body {
        background: #404040;
        border: 1px solid #666;
        color: #999;
        font: 14px "Lucida Grande", "Lucida Sans Unicode", tahoma, verdana, arial, sans-serif;
        margin: 5% 10%;
        text-align: center;
    }
    
    a {
        color: #FF8301;
    }
    
    h1 {
        color: #EEE;
    }
    
    #container {
        background: #292929;
        line-height: 2.4;
        padding: 1em;
    }
    
    p#url {
        font-weight: bold;
        overflow: hidden;
        width: 100%;
    }
    </style>
</head>
<body bgcolor="#000000">
<center>
<div id="container">
<p>Please wait while you're being redirected to:<br /></p>
<p id="url"><a href="<?php echo $ref;?>"><?php echo $ref;?></a></p>
<hr />
<p><a href="http://extremecoderz.com">extremecoderz.com</a></p>
<div>
</center>
</body>
</html>
The second link is a divert.php file - ripped from anonym.to - credits to avek for ripping it.


useage: divert.php? ref = http://www.google.com


(remove spaces)