0 && $u['port']!=80 ? ":".$u['port'] : ""); } $bsite=$bbase.$bsite; } if (!eregi("[a-z]+://", $bsite)) die('not allowed'); if (!eregi("^http://", $bsite)){ header("Location: $bsite"); exit; } $u=parse_url($bbase); $bbase=$u['scheme']."://".$u['host'].($u['port']>0 && $u['port']!=80 ? ":".$u['port'] : "") .($u['path'] ? $u['path'] : "/"); $params=$u['query']; reset($_GET); while (list($n,$v)=each($_GET)){ if ($n=="bbase" || $n=="bsite") continue; if ($params || ereg("\?", $bsite)) $params.="&"; else $params="?"; $params.=str_replace(" ","+",urlencode($n))."=".str_replace(" ","+",urlencode($v)); } //reset($_POST); //while (list($n,$v)=each($_POST)){ // if ($n=="bbase" || $n=="bsite") continue; // if ($params || ereg("\?", $bsite)) $params.="&"; else $params="?"; // $params.=str_replace(" ","+",urlencode($n))."=".str_replace(" ","+",urlencode($v)); //} //print htmlspecialchars($bsite.$params); exit; if (!($fp=@fopen($bsite.$params, "r"))) die("can't open '".htmlspecialchars($bsite.$params)."'"); $d=""; while (!feof($fp)) $d.=fread($fp, 4096); fclose($fp); $u=parse_url($bsite); if (!$u['path']) $u['path']="/"; $bbase=$u['scheme']."://".$u['host'].($u['port']>0 && $u['port']!=80 ? ":".$u['port'] : "").ereg_replace("/[^/]+\.[^/]+", "/", $u['path']); if (!eregi(".*]+base=.*", $d)){ if (eregi(".*", $d)){ $d=eregi_replace("", "", $d); } else { if (eregi("", $d)){ $d=eregi_replace("", "", $d); } else { $d="".$d.""; } } } print strtobsprachehtml($d, "http://www.ashberg.de/bproxy.php", $bbase); ?>