1 男装,54?<br>
2
3 <?php
4 $uid =$_GET["id"];
5 $url = "http://www.test2.com/leimu.html";
6 $contents = file_get_contents($url);
7 //如果出现中文乱码使用下面代码
8 //$getcontent = iconv("gb2312", "utf-8",$contents);
9
10 $shu1 = get_sub_content($contents, $uid, "<br>");
11 echo $shu1;
12
13 function get_sub_content($str, $start, $end) {
14 $start = trim($start);
15 $end = trim($end);
16 if ($start == '' || $end == '') {
17 return $str;
18 }
19 $str = explode($start, $str);
20 $str = explode($end, $str[1]);
21 return $str[0];
22 }
23
24 ?>