用正则~preg_replace
preg_match
preg_match_all
几个函数

解决方案 »

  1.   

    先用以下的小偷程序得到源代码
    <?php
    /*****************函数部分**************************/
    /*获取指定网页的内容
    $url为网页地址
    */
    function getcontent($url){ 
    if($open=file($url)){ 
       $count=count($open); 
        for($i=0;$i<$count;$i++)
        { 
         $theget.=$open[$i]; 
         } 
      }else{ 
      die('请求过多,超时,请刷新'); 
      } 
     return $theget; 

    ?>
    <?php
    /***********************程序部分**************************/
    $url="http://www.url.com/judge.jsp?username=admin&password=admin888";
    getcontent($url);//第一处
    $url="http://www.url.com/manage.jsp";
    $gethtml=getcontet($url);
    echo $gethtml;
    ?>
    然后用正则preg_match进行查找替换,得到你需要的值
      

  2.   

    我把你的程序放入我写的一个link_data.php文件中,然后把你提供的网址修改了一下,再运行,得到的结果是:
    Fatal error: Call to undefined function: getcontet() in d:\appserv\www\link_data.php on line 24
    请问是什么原因?
      

  3.   

    楼主好可爱楼上的只是举了个例子,并没有给你全部的代码。getcontent()还是要自己定义的
      

  4.   

    getcontent()黑翼不是已经写出来了吗
      

  5.   

    file_get_contents($url);然后正则分析
      

  6.   

    $file = fopen (网址, "r");
    while (!feof ($file)) {
        $line4 = fgets ($file, 1024);
        if (eregi ("<title>(.*)</title>", $line4, $out4)) {
            $a = $out4[1];
            break;
        }
    }