<?php
function wlink($ws){
	define('DOURL','http://pan.julongdj.com/demo-');
	if($ws == 1){
		$uri = $_SERVER["REQUEST_URI"];
		preg_match("{/url.php/(.+)/}",$uri,$tqm);
		$gc = $tqm[1];
		$arr_uri = explode('/',$uri);
		$uricoun = count($arr_uri) - 1;
		$fpath = DOURL.$gc.''.$arr_uri[$uricoun];
		header("Location:".$fpath);	
	}else{
		$gc = @$_GET['gc'];
		$hz = @$_GET['hz'];
		$fpath = DOURL.$gc.''.$hz;
		header("Location:".$fpath);	
	}
}

wlink(1);
?>