document.write(pageConfig.segs);

解决方案 »

  1.   


    你这是js的写法吧,
    我要的是php中的写法,就是说以上是一个长字符串
      

  2.   

    jquery的$.post以json方式传递参数到服务端,$arr = json_decode($pageConfig);
    print_r($arr['segs']);
      

  3.   

            $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,'http://www.tudou.com/listplay/y83tC260d_c/lX9akfH3BO0.html');
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    $htmls = curl_exec($ch);
    curl_close($ch);
    preg_match('@,segs: \'(.*?)\'@i',$htmls,$match);
            //echo $match[0];
    echo substr($match[0],8,-1);没给具体网址,随便找了个土豆的页面做实验,正则提取出seg后面的json数组。