I'm just looking for some review for my code.  This is a script that checks for outbound links in posts in vBulletin forums, and if it is an external link it will redirect to a template which will load the external site in an iFrame that I also coded, inspired by themeforest and stumbleupon's way of showing external links.This is my first PHP script on my own that is a little more advanced.  I'm only use to the basics, so any critique is good critique, it's the only way I can learn.I don't even know if I went about doing this correctly, but it seems to work how I'm wanting currently.  Let me know what I can do differently.To get an idea of this you can see it in action - HereHTTPS links don't work, however, I still want them redirected with this so all outbound links on my site will derive from the same page, so I included a button for if a certain page won't load you can click that button and it will take you to the page.$curdir = getcwd ();chdir('./');define('NO_REGISTER_GLOBALS', 1);define('THIS_SCRIPT', 'drc-redirect');$globaltemplates = array('drc_redirect');require_once('./global.php');if ($_GET) {    foreach ($_GET as $key => $value) {        if ($key==l) {            $url1 = $value;        }        else {            $url2 = &. $key. =. $value;        }    }    $out = strip_tags($url1. $url2);}$site = parse_url($_SERVER['HTTP_HOST']);$site = $site[path];$url = parse_url($out);if ($url[scheme] == http OR https && $url[host]) {    if ($site == $url[host]) {        Header( Location: . $out );    }    else {        eval('print_output(' . fetch_template('drc_redirect') . ');');    }}I would like to add a few things to it still but first wanted to get some suggestions on my code.
Framed external link redirect - vBulletin
php