解决方案 »

  1.   

    php做这个还是有点麻烦,需要带上第一次登录后获取到的cookie参考:http://www.php.net/manual/en/function.curl-setopt.php/
      

  2.   

    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,'http://api.ajaxsns.com/api.php?key=free&appid=0&msg='.rawurlencode('我是谁').'?');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); 
    $htmls = curl_exec($ch);
    curl_close($ch);
    echo $htmls;
    ?>
      

  3.   

    你看看cookie是否设置,如果接口要正确.否则显示不了
      

  4.   

    我也想知道这个问题,带上cookie 只是刚登录以后的cookie
    ,有的网站 你点不同的页面时候 ,我用抓包软件,发现 cookie 里面 的sessionid值不停的在变化,请问这种情况下怎么办