...

View Full Version : using redirect for outgoing links



bucket
11-02-2009, 04:53 PM
Please can I get some help with this:

1. Setting up so that all external links use mywebsite.com/out?= or similar for all outgoing URLS by default.

2. Also, that page should take the user to a 'redirecting you page' and then onto the destination.

Thanks!

mlseim
11-03-2009, 02:23 AM
example:
mywebsite.com/out?=http://www.google.com

This has to be the "index.php" file in your case, because you didn't specify any file ...


<?php
// default in case they don't enter any URL
$out="index.php";

// get URL variable
if($_GET['out']){
$out=$_GET['out'];
}

// redirect
header ("location: $out");
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum