..I will show you how to make a multi bridge between THC_DO, THC_SS and THC_II and keep track of the output in realtime using iframes. So what exactly are we going to do? First of..
<?php
/*
Loads the environment when not in root, so ideal for iframe pages like screen.php
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 21-03-2015
*/
// ok, we don't know where the thc root may be.. so let's go down the directory tree till we find the paths.php file
$sRoot = str_replace($_SERVER['DOCUMENT_ROOT'],"",$_SERVER['SCRIPT_FILENAME']);
// get rid of some slashes that will cause havoc, as we'll use arrays
if($sRoot[0]=="/"){
$sRoot = substr($sRoot,1);
}
if($sRoot[strlen($sRoot)-1]=="/"){
$sRoot = substr($sRoot,0,-1);
}
$aRoot = explode("/",$sRoot);
$iRoot = count($aRoot);
// find the paths.php file
$_NEW_ROOT = "";
for($x=0;$x<$iRoot;$x++){
if($x==0){
$_NEW_ROOT .= ($_SERVER['DOCUMENT_ROOT'][strlen($_SERVER['DOCUMENT_ROOT'])-1]=="/" ? substr($_SERVER['DOCUMENT_ROOT'],0,-1) : $_SERVER['DOCUMENT_ROOT']);
}
if(file_exists($_NEW_ROOT."/paths.php")){
break;
}
$_NEW_ROOT .= "/".$aRoot[$x];
}
if($_NEW_ROOT!=""){
define('SCREEN',1);
define('IN_SCRIPT',1);
$_DYNAMIC_ROOT = $_NEW_ROOT;
include_once($_DYNAMIC_ROOT."/paths.php");
include_once($_DYNAMIC_ROOT."/header.php");
}
?>