V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
GASALA
V2EX  ›  问与答

请问有新浪微博定时发布程序或脚本吗?

  •  
  •   GASALA · 2013-03-01 22:57:10 +08:00 · 3069 次点击
    这是一个创建于 4079 天前的主题,其中的信息可能已经有所发展或是发生改变。
    网上现成的程序都不能自定义微博来源。。。所以有现成的源码或程序吗?
    4 条回复    1970-01-01 08:00:00 +08:00
    zythum
        1
    zythum  
       2013-03-01 22:59:34 +08:00   ❤️ 1
    微博来源 是写死的不能自定义。根据微博给他们的appkey定的
    GASALA
        2
    GASALA  
    OP
       2013-03-01 23:06:04 +08:00
    @zythum 那有能用自己KEY的定时程序吗。。。
    tarsier
        3
    tarsier  
       2013-03-01 23:07:25 +08:00
    定是脚本倒没多难,用weibo sdk + api key很好写 (有相关接口)

    只不过来源没法定制
    dotbuddle
        4
    dotbuddle  
       2013-03-01 23:10:34 +08:00
    配合corn使用
    <?php
    //header("Content-type:application/x-www-form-urlencoded");
    //header("Accept:text/vnd.wap.wml,text/html,text/plain,image/*,*/*");
    function sendWeibo($cont){
    $content=$cont;
    $url="http://weibo.cn/mblog/sendmblog?st=8cea&vt=4&gsid=填写你的";
    $post_data="rl=0&content=".$content;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    // 我们在POST数据哦!
    curl_setopt($ch, CURLOPT_POST, 1);
    // 把post的变量加上
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $output = curl_exec($ch);
    curl_close($ch);
    }

    ?>
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2226 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 02:19 · PVG 10:19 · LAX 19:19 · JFK 22:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.