当前位置:Gxlcms > PHP教程 > PHP解密哪位高手能帮我解,非常感谢!

PHP解密哪位高手能帮我解,非常感谢!

时间:2021-07-01 10:21:17 帮助过:34人阅读


完整代码在这里http://yunpan.cn/cghEydCq8uwb9 (提取码:7744)



回复讨论(解决方案)

$v){				  $v = iconv("GBK","utf-8",urldecode($v));				  				  if(strlen($v)>9){					  $v = str_replace('"','',$v);					  $v = str_replace("'",'',$v);				  }				  $topkey[] = $v;				  			  }			}			if(count($topkey)>10){			   file_put_contents($file,"");				}	}	return $topkey;}function huoduan_get_baidu($q,$p=1,$time=86400){	$s = urlencode($q);	$file = ROOT_PATH.'/cache/so_'.md5($q.$p).'.php';	$list = '';	if(is_file($file) && time()-filemtime($file)<$time){		include($file);	}else{	    $html = huoduan_get_html('http://www.baidu.com/s?wd='.$s.'&pn='.(($p-1)*10).'&rn=15&tn=baidulocal&ie=utf-8');				//$html = iconv("GBK","utf-8",$html);		if(!strpos($html,'未找到和您的查询"','',1);		   			$lists['title'] = huoduan_get_content_array($body,'','
',1); $lists['des'] = huoduan_get_content_array($body,'','
',1); $lists['blink'] = huoduan_get_content_array($body,'','',1); foreach($lists['title'] as $k=>$v){ $list['data'][$k]['title'] = huoduan_get_body($lists['title'][$k],'','',1); $list['data'][$k]['title'] = str_replace('','',$list['data'][$k]['title']); $list['data'][$k]['title'] = str_replace('','',$list['data'][$k]['title']); $list['data'][$k]['link'] = huoduan_get_body($lists['title'][$k],''); $list['data'][$k]['blink'] = $lists['blink'][$k]; } $pager = huoduan_get_body($html,'
    ','
',1); $pagerli = huoduan_get_content_array($pager,'',0); if(strpos($pager,'下一页')){ $pcount = count($pagerli); $list['pnum'] = strip_tags($pagerli[$pcount-i(a(a),-12,1)]); $list['pnum'] = trim($list['pnum'],'['); $list['pnum'] = trim($list['pnum'],']'); $list['pnext']=1; }else if(is_array($pagerli)){ $pcount = count($pagerli); $list['pnum'] = strip_tags($pagerli[$pcount-i(a,112,1)]); $list['pnum'] = trim($list['pnum'],'['); $list['pnum'] = trim($list['pnum'],']'); $list['pnext']=0; } if(is_array($list['data'])){ file_put_contents($file,""); } } } return $list;}function huoduan_get_baidu_xg($q){ $s = urlencode($q); $file = ROOT_PATH.'/cache/xg_'.md5($q).'.php'; if(is_file($file)){ include($file); }else{ $html = huoduan_get_html('http://www.baidu.com/s?wd='.$s.'&ie=utf-8'); //$html = iconv("GBK","utf-8",$html); if(strpos($html,'相关搜索')){ $body = huoduan_get_body($html,'相关搜索','',1); $xglist = huoduan_get_content_array($body,'<'.substr(a,64,1),'',0); foreach($xglist as $k=>$v){ $xgdata[$k] = strip_tags($v); } file_put_contents($file,""); } } return $xgdata;} function huoduan_get_body($str,$start,$end,$option){ $strarr=explode($start,$str); $tem=$strarr[1]; if(empty($end)){ return $tem; }else{ $strarr=explode($end,$tem); if($option==1){ return $strarr[0]; } if($option==2){ return $start.$strarr[0]; } if($option==3){ return $strarr[0].$end; } else{ return $start.$strarr[0].$end; } } } function huoduan_replace_content($str,$start,$end,$replace = '',$option){ $del_code = huoduan_get_body($str,$start,$end,$option); $str = str_replace( $del_code, $replace, $str ); return $str; } function huoduan_zz($string){ $string = str_replace( '/', '\/', $string ); $string = str_replace( '$', '\$', $string ); $string = str_replace( '*', '\*', $string ); $string = str_replace( '"', '\"', $string ); $string = str_replace( "'", "\'", $string ); $string = str_replace( '+', '\+', $string ); $string = str_replace( '^', '\^', $string ); $string = str_replace( '[', '\[', $string ); $string = str_replace( ']', '\]', $string ); $string = str_replace( '|', '\|', $string ); $string = str_replace( '{', '\{', $string ); $string = str_replace( '}', '\}', $string ); $string = str_replace( '%', '\%', $string ); $string = str_replace( '-', '\-', $string ); $string = str_replace( '(', '\(', $string ); $string = str_replace( ')', '\)', $string ); $string = str_replace( '>', '\>', $string ); $string = str_replace( '<', '\<', $string ); $string = str_replace( '?', '\?', $string ); $string = str_replace( '.', '\.', $string ); $string = str_replace( '!', '\!', $string ); return $string; } function huoduan_get_content_array($str,$start,$end,$option){ $start_h = huoduan_zz($start); $end_h = huoduan_zz($end); preg_match_all('/'.$start_h.'(.+?)'.$end_h.'/is',$str,$match); $count = count($match[1]); for($i=0;$i<$count;$i++){ if($option==1){ $arr[$i]=$match[1][$i]; } else if($option==2){ $arr[$i]=$start.$match[1][$i]; } else if($option==3){ $arr[$i]=$match[1][$i].$end; }else{ $arr[$i]=$start.$match[1][$i].$end; } } return $arr; }

非常感谢版主!是怎么解的说说流程可以?

$v){				  $v = iconv("GBK","utf-8",urldecode($v));				  				  if(strlen($v)>9){					  $v = str_replace('"','',$v);					  $v = str_replace("'",'',$v);				  }				  $topkey[] = $v;				  			  }			}			if(count($topkey)>10){			   file_put_contents($file,"");				}	}	return $topkey;}function huoduan_get_baidu($q,$p=1,$time=86400){	$s = urlencode($q);	$file = ROOT_PATH.'/cache/so_'.md5($q.$p).'.php';	$list = '';	if(is_file($file) && time()-filemtime($file)<$time){		include($file);	}else{	    $html = huoduan_get_html('http://www.baidu.com/s?wd='.$s.'&pn='.(($p-1)*10).'&rn=15&tn=baidulocal&ie=utf-8');				//$html = iconv("GBK","utf-8",$html);		if(!strpos($html,'未找到和您的查询"','',1);		   			$lists['title'] = huoduan_get_content_array($body,'','
',1); $lists['des'] = huoduan_get_content_array($body,'','
',1); $lists['blink'] = huoduan_get_content_array($body,'','',1); foreach($lists['title'] as $k=>$v){ $list['data'][$k]['title'] = huoduan_get_body($lists['title'][$k],'','',1); $list['data'][$k]['title'] = str_replace('','',$list['data'][$k]['title']); $list['data'][$k]['title'] = str_replace('','',$list['data'][$k]['title']); $list['data'][$k]['link'] = huoduan_get_body($lists['title'][$k],''); $list['data'][$k]['blink'] = $lists['blink'][$k]; } $pager = huoduan_get_body($html,'
    ','
',1); $pagerli = huoduan_get_content_array($pager,'',0); if(strpos($pager,'下一页')){ $pcount = count($pagerli); $list['pnum'] = strip_tags($pagerli[$pcount-i(a(a),-12,1)]); $list['pnum'] = trim($list['pnum'],'['); $list['pnum'] = trim($list['pnum'],']'); $list['pnext']=1; }else if(is_array($pagerli)){ $pcount = count($pagerli); $list['pnum'] = strip_tags($pagerli[$pcount-i(a,112,1)]); $list['pnum'] = trim($list['pnum'],'['); $list['pnum'] = trim($list['pnum'],']'); $list['pnext']=0; } if(is_array($list['data'])){ file_put_contents($file,""); } } } return $list;}function huoduan_get_baidu_xg($q){ $s = urlencode($q); $file = ROOT_PATH.'/cache/xg_'.md5($q).'.php'; if(is_file($file)){ include($file); }else{ $html = huoduan_get_html('http://www.baidu.com/s?wd='.$s.'&ie=utf-8'); //$html = iconv("GBK","utf-8",$html); if(strpos($html,'相关搜索')){ $body = huoduan_get_body($html,'相关搜索','',1); $xglist = huoduan_get_content_array($body,'<'.substr(a,64,1),'',0); foreach($xglist as $k=>$v){ $xgdata[$k] = strip_tags($v); } file_put_contents($file,""); } } return $xgdata;} function huoduan_get_body($str,$start,$end,$option){ $strarr=explode($start,$str); $tem=$strarr[1]; if(empty($end)){ return $tem; }else{ $strarr=explode($end,$tem); if($option==1){ return $strarr[0]; } if($option==2){ return $start.$strarr[0]; } if($option==3){ return $strarr[0].$end; } else{ return $start.$strarr[0].$end; } } } function huoduan_replace_content($str,$start,$end,$replace = '',$option){ $del_code = huoduan_get_body($str,$start,$end,$option); $str = str_replace( $del_code, $replace, $str ); return $str; } function huoduan_zz($string){ $string = str_replace( '/', '\/', $string ); $string = str_replace( '$', '\$', $string ); $string = str_replace( '*', '\*', $string ); $string = str_replace( '"', '\"', $string ); $string = str_replace( "'", "\'", $string ); $string = str_replace( '+', '\+', $string ); $string = str_replace( '^', '\^', $string ); $string = str_replace( '[', '\[', $string ); $string = str_replace( ']', '\]', $string ); $string = str_replace( '|', '\|', $string ); $string = str_replace( '{', '\{', $string ); $string = str_replace( '}', '\}', $string ); $string = str_replace( '%', '\%', $string ); $string = str_replace( '-', '\-', $string ); $string = str_replace( '(', '\(', $string ); $string = str_replace( ')', '\)', $string ); $string = str_replace( '>', '\>', $string ); $string = str_replace( '<', '\<', $string ); $string = str_replace( '?', '\?', $string ); $string = str_replace( '.', '\.', $string ); $string = str_replace( '!', '\!', $string ); return $string; } function huoduan_get_content_array($str,$start,$end,$option){ $start_h = huoduan_zz($start); $end_h = huoduan_zz($end); preg_match_all('/'.$start_h.'(.+?)'.$end_h.'/is',$str,$match); $count = count($match[1]); for($i=0;$i<$count;$i++){ if($option==1){ $arr[$i]=$match[1][$i]; } else if($option==2){ $arr[$i]=$start.$match[1][$i]; } else if($option==3){ $arr[$i]=$match[1][$i].$end; }else{ $arr[$i]=$start.$match[1][$i].$end; } } return $arr; }


可以帮我解完整代码?

这就是完整的,只不过按习惯略去了最后的 ?>

这就是完整的,只不过按习惯略去了最后的 ?>


版主你是用什么方法解出来的要!

人气教程排行