我用file_get_contents 和简单的curl试过了 无法获取 请高手指点下http://video.shishicai.cn/haoma/cqssc/list/120.aspx这个是地址 只要获取到最新一期的开奖号码即可 谢谢了在线刷新等 

解决方案 »

  1.   

    人家做了防抓取,你就别吊死在一棵树上了,帮你找了个能抓的地址http://life.baifubao.com/caipiao/0/query/0?lot=ssc&c=859
    正则就不帮你写了,自己动手
      

  2.   

    哥们这个地址没用的啊 延迟好几分钟的能帮忙看下http://video.shishicai.cn/haoma/cqssc/list/120.aspx
    这个地址吗
      

  3.   

    http://jk.trade.500wan.com/ssc/ 这个站也可以 麻烦各位大神看看
      

  4.   


    header('Content-Type: text/html; charset=UTF-8');
    $url = 'http://video.shishicai.cn/haoma/cqssc/list/120.aspx';
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_REFERER, 'http://video.shishicai.cn');
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)");
    $response = curl_exec($ch);
    curl_close($ch);
    preg_match('/var listIssue =(.*}]);/isU', $response, $match);
    $json = trim($match[1]);
    $array = json_decode($json, true);
    foreach ($array as $value) {
        echo "<pre>{$value['BonusNumberString']}</pre>";
    }
    输出结果如下,第一个就是最新的,自己取吧3,4,2,1,5|2|5
    7,0,5,3,2|2|5
    3,4,0,1,5|2|5
    4,0,7,8,5|2|5
    4,6,0,3,9|2|5
    9,5,4,4,6|2|5
    8,3,8,7,6|2|5
    2,0,8,7,8|2|5
    6,6,5,9,6|2|5
    1,9,7,3,1|2|5
    1,7,7,4,3|2|5
    1,8,3,0,4|2|5
    8,1,0,8,3|2|5
    2,7,1,9,6|2|5
    1,8,6,2,2|2|5
    1,1,0,9,8|2|5
    1,2,0,0,7|2|5
    1,8,4,8,5|2|5
    6,6,8,6,4|2|5