求一个根据用户名取得新浪微博内容的程序。

解决方案 »

  1.   

    新浪有直接接口吧……你去看看  用curl应该都能获得……
      

  2.   


    $url = 'http://service.t.sina.com.cn/widget/WeiboShow.php?width=470&height=380&fansRow=1&ptype=1&speed=100&skin=-1&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=1391486805&verifier=624116a0&colors=d6f3f7,ffffff,666666,117d6e';$content = file_get_contents($url);preg_match_all('/<dd\s+class="msg">(.*?)<\/dd>/is',$content,$arr) ;
    echo '<pre />';
    print_r($arr[1]);
      

  3.   


    $url = 'http://service.t.sina.com.cn/widget/WeiboShow.php?width=470&height=380&fansRow=1&ptype=1&speed=100&skin=-1&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=1391486805&verifier=624116a0&colors=d6f3f7,ffffff,666666,117d6e';$content = file_get_contents($url);$part = '/<dl>\s*<dd\s*class="msg"><a\s*href="(.*?)"\s*target="_blank"><\/a>\s*<span\s*class="mbTxtB" >(.*?)<\/span><\/dd>/is';preg_match_all($part,$content,$arr) ;
    echo '<pre />';
    print_r($arr[1]);
    print_r($arr[2]);
      

  4.   

    谢谢楼上的,我发贴子后发现链接跑到上面去了,你可以误解了我的意思,
    我的意思是我如何根据一个新浪微博登陆用户名和密码获取到该用户的uid