RIM提供的标准BES Push例子代码是基于Java/Domino/ASP的。没有php的官方例子代码。
这里给一个简单的php例子,是基于参考1简化而来的,可以通过BES emulator推送数据到BlackBerry Emulator上的客户端程序ECL Sample client(客户端代码参考最后两个链接)。
<html><head><title>Push Results</title></head><body><?php// create a new cURL resource$ch = curl_init();$data = 'NEXT_GROUP;Operations Team;NEW_CONTACT;Wang Bo 2011;Sr. Vice President, Operations;Office: 519 555-1111;Cell: 519 555-1222;Email: john.doe@email.xyz.com;BlackBerry: pin:1111111F;Prime Backup: John Flow;NEW_CONTACT;John Flow;Manager, Manufacturing Operations;Office: 519 555-2111;Cell: 519 555-2222;Email: john.flow@email.xyz.com;BlackBerry: pin:2222222F;Prime Backup: ;NEW_CONTACT;John Snow;Manager, Transportation Operations;Office: 519 555-3111;Cell: 519 555-3222;Email: john.snow@email.xyz.com;BlackBerry: pin:3333333F;Prime Backup: Julian;NEXT_GROUP;Support Team;NEW_CONTACT;Julian Migs;Team Planner;Office: 519 555-4111;Cell: 519 555-4222;Email: julian@email.xyz.com;Prime Backup: Ricky;NEW_CONTACT;Ricky Williams;Vice President, Plannning;Office: 519 555-5111;Cell: 519 555-5222;Email: ricky@email.xyz.com;NEW_CONTACT;Bubbles Devil;Feline Affairs Specialist;Office: 519 555-6111;Cell: 519 555-6222;Email: bubbles@email.xyz.com;NEW_CONTACT;Randy Whitt;Assistant Weekend Supervisor;Office: 519 555-7111;Cell: 519 555-7222;Email: randy@email.xyz.com;';// set URL and other appropriate optionscurl_setopt($ch, CURLOPT_URL, "http://localhost:8080/push?DESTINATION=2100000A&PORT=911&REQUESTURI=/");curl_setopt($ch, CURLOPT_HEADER, true);curl_setopt($ch, CURLOPT_USERAGENT, "BlackBerry Push Service SDK/1.0");curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, $data);curl_setopt($ch, CURLOPT_VERBOSE, true);// grab URL and pass it to the browsercurl_exec($ch);// close cURL resource, and free up system resourcescurl_close($ch);?></body></html>
参考:
1)BES Push
http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Push-API-sample-code-needed/td-p/468267
2)BIS Push
http://us.blackberry.com/devjournals/resources/journals/jan_2005/push_me.jsp#Download_The_Source
3)ECL Java Push例子: What Is - Sample applications demonstrating BlackBerry push technology: Emergency Contact List
To push an Emergency Contact List toa BlackBerry smartphone, configure a Browser Channel push with the Emergency Contact List. A test application has been created and can be referred to in this article:DB-00442.
4)BES推送应用实例演示与分析
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com