`
lukeshei
  • 浏览: 387753 次
  • 性别: Icon_minigender_1
  • 来自: 台北
社区版块
存档分类
最新评论

3分鐘學會使用程式發送msn訊息, Perl篇(四) (MSN機器人)

阅读更多
<div?class="post?hentry"><a?name="5360174869199190854"><h3?class="post-title?entry-title"><a?href="http: rd-program.blogspot.com="" 2008="" 11="" 3msn-perl_14.html"="">3分鐘學會使用程式發送msn訊息,?Perl篇(四)<div?class="post-header-line-1"> <div?class="post-body?entry-content">

<a?href="http: www.program.com.tw="" newpage="" msnsdk.htm"=""><font?color="#6699cc">msnSDK訊息控制開發套件?同時支援MSN/Yahoo即時通?訊息雙向傳遞<br?><br?>perl?的範例我們使用soap?介面來處理,其他語言也可以這樣做,可參考文件(文末提供下載處)<br?>wsdl位置:http://59.120.234.84:8082/msnSDK/genwsdl-win32<br?><br?>ps.也請參考?<a?href="http: rd-program.blogspot.com="" 2008="" 11="" msnsdk.html"=""><font?color="#666699">msnSDK的使用流程?<br?>================================<br?>#!/usr/bin/perl<br?>use?SOAP::Lite;<br?><br?>#取得使用api?的權限<br?>sub?setspid<br?>{<br?>my?$session_ret=SOAP::Lite->uri('http://59.120.234.84:8082/MSN')<br?>->proxy('http://59.120.234.84:8082/msnSDK/msn_soap-win32')<br?>->GETSPID('apiblogt4','msnsdkt')->result;<br?>my?($code,$session)=split("\t",$session_ret);<br?>$session=~tr/\r\n?//d;<br?>return?$session;<br?>}<br?><br?>#註冊聯絡人<br?>sub?register<br?>{<br?>my?$sret=?setspid();<br?>my?$session_ret=SOAP::Lite->uri('http://59.120.234.84:8082/MSN')<br?>->proxy('http://59.120.234.84:8082/msnSDK/msn_soap-win32')<br?>->REGISTER('要加入聯絡人的msn/yahoo帳號',$sret)->result;<br?>print?$session_ret;<br?>}<br?><br?>#傳送訊息<br?>sub?sendmsg<br?>{<br?>my?$sret=?setspid();?<br?>my?$msg_ret?=?SOAP::Lite->uri('http://59.120.234.84:8082/MSN')-><br?>proxy('http://59.120.234.84:8082/msnSDK/msn_soap-win32')-><br?>SENDMSG(?'要傳送訊息聯絡人的msn/yahoo帳號',?'欲傳送的訊息',?'utf-8','1',$sret)->result;<br?>print?$msg_ret;?<br?>}<br?><br?>其他更詳細的參數可以參考<a?href="http: tcmail.program.com.tw="" image="" msnsdk.pdf"=""><font?color="#666699">msnSDK訊息控制開發套件程式介面說明書

<div?style="clear:?both"> <div?class="post-footer"><p?class="post-footer-line?post-footer-line-1"><span?class="post-labels">標籤:?<a?href="http: rd-program.blogspot.com="" search="" label="" 3%e5%88%86%e9%90%98%e5%ad%b8%e6%9c%83%e4%bd%bf%e7%94%a8%e7%a8%8b%e5%bc%8f%e7%99%bc%e9%80%81msn%e8%a8%8a%e6%81%af"?rel="tag"><font?color="#666699">3分鐘學會使用程式發送msn訊息,?<a?href="http: rd-program.blogspot.com="" search="" label="" msnlib"?rel="tag"><font?color="#6699cc">msnlib,?<a?href="http: rd-program.blogspot.com="" search="" label="" msnp15"?rel="tag"><font?color="#6699cc">MSNP15,?<a?href="http: rd-program.blogspot.com="" search="" label="" msnsdk"?rel="tag"><font?color="#6699cc">msnSDK,?<a?href="http: rd-program.blogspot.com="" search="" label="" msnsdk%e8%a8%8a%e6%81%af%e6%8e%a7%e5%88%b6%e9%96%8b%e7%99%bc%e5%a5%97%e4%bb%b6"?rel="tag"><font?color="#6699cc">msnSDK訊息控制開發套件,?<a?href="http: rd-program.blogspot.com="" search="" label="" msn%e6%a9%9f%e5%99%a8%e4%ba%ba"?rel="tag"><font?color="#666699">msn機器人,?<a?href="http: rd-program.blogspot.com="" search="" label="" msn%e9%96%8b%e7%99%bc%e5%a5%97%e4%bb%b6"?rel="tag"><font?color="#6699cc">msn開發套件,?<a?href="http: rd-program.blogspot.com="" search="" label="" perlmsn"?rel="tag"><font?color="#6699cc">perlmsn,?<a?href="http: rd-program.blogspot.com="" search="" label="" pmsn"?rel="tag"><font?color="#6699cc">pmsn

<p?class="post-footer-line?post-footer-line-2"> 

<p?class="post-footer-line?post-footer-line-3"> 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics