zoukankan      html  css  js  c++  java
  • 微信公众平台开发(72)第三方接口

    微信公众平台开发 第三方接口
    作者:方倍工作室 
    地址:http://www.cnblogs.com/txw1958/p/weixin72-third-party-api.html

    测试代码

    <?php
    /*
        方倍工作室 第三方接口 测试代码
    */
    
    $post = "<xml><ToUserName><![CDATA[gh_204936aea56d]]></ToUserName>
    <FromUserName><![CDATA[oc7tbuPEJdWm7jLJqRPCDNoWq480]]></FromUserName>
    <CreateTime>1383811836</CreateTime>
    <MsgType><![CDATA[text]]></MsgType>
    <Content><![CDATA[深圳天气]]></Content>
    <MsgId>5943426579437733541</MsgId>
    </xml>";
    
    $url = "http://www.abc.com/weixin/";
    $headers = array("Content-Type: text/xml; charset=utf-8");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    $output = curl_exec($ch);
    curl_close($ch);
    echo $output;
    
    ?>

    方倍工作室微信公众平台账号关注方法:
    1. 微信通讯录-添加朋友-查找公众号-搜索“方倍工作室”
    2. 微信通讯录-添加朋友-搜号码-输入“pondbaystudio”
    3. 使用微信扫描下面的二维码

  • 相关阅读:
    能量项链
    开学前最后一天信奥赛一本通重刷日记
    重刷信奥赛一本通日记-3
    重刷信奥赛一本通日记-2
    重刷信奥赛一本通日记-1
    第二次考试题解way
    第一次考试题解
    第一次考试感言
    「HNOI2012」矿场搭建
    「HAOI2006」受欢迎的牛
  • 原文地址:https://www.cnblogs.com/txw1958/p/weixin72-third-party-api.html
Copyright © 2011-2022 走看看