用PHP伪造来路信息

function getUrl($address, $myip) {   
    ob_start();   
    $mtime = explode(' ', microtime());   
    $starttime = $mtime[1] + $mtime[0];   
  
    $onoff = (function_exists('ini_get')) ? ini_get('register_globals') : get_cfg_var('register_globals');   
  
    if($onoff != 1) {   
        @extract($_POST, EXTR_SKIP);   
        @extract($_GET, EXTR_SKIP);   
    }   
  
    $self = $_SERVER['PHP_SELF'];   
    $myaddress = 'http://'.$_SERVER['HTTP_HOST'].$self;   
  
    $comm = '';   
  
    if(isset($url) && $url) {   
        $url = str_replace($address, '', $url);   
    }   
    /*  
    foreach($_POST as $key => $val) {  
    if($comm == '') {  
    $comm = $key.'='.rawurlencode($val);  
    } else {  
    $comm = $comm.'&'.$key.'='.rawurlencode($val);  
    }  
    }  
 

阅读全文>>

你可能感兴趣的:(用PHP伪造来路信息)