91嫩草国内在线,韩国理论电影免费看,6969精品视频在线观看,1024在线视频精品免费,色中色污,饭冈佳奈子在线
跳至內容
Cobub文檔中心
用戶工具
登錄
站點工具
工具
顯示頁面
修訂記錄
反向鏈接
媒體管理器
網站地圖
登錄
媒體管理器
網站地圖
本頁面只讀。您可以查看源文件,但不能更改它。如果您覺得這是系統錯誤,請聯系管理員。
~~Title:Cobub Toaster WEB接口調用樣例代碼 - 開源移動應用運營平臺 - 移動統計、移動推送解決方案 - Cobub 移動開發者中心~~ {{description>您可以在這里找到推送服務器Web接口調用的樣例代碼}} {{keywords>Cobub Toaster,開源移動應用分析,移動分析,移動應用分析,樣例代碼}} ====== 推送服務器WEB接口調用樣例代碼 ====== 您可以在這里找到推送服務器Web接口調用的樣例代碼 **Cobub @ github** 您可以在[[https://github.com/cobub/|github of Cobub]]找到更多相關代碼。 **PHP樣例** <code php> if(isset($_POST["serverurl"]) && isset($_POST["data"]) && isset($_POST["appid"]) && isset($_POST["channel"]) && isset($_POST["expired"])) { $serverUrl = $_POST["serverurl"]; //Get Server URL, configured in the Cobub Toaster configure file $data = $_POST["data"]; //Push content $appid = $_POST["appid"]; // APP ID $channel = $_POST["channel"]; // Which channel to push $expired = $_POST["expired"]; // expire timestamp of the notification $post = 'expired='.$expired.'&channel='.$channel."&appid=".$appid."&data=".$data; //Construct the curl paramenters $curl = curl_init ( $serverUrl ); curl_setopt ( $curl, CURLOPT_HEADER, 0 ); $header = array (); $header [] = 'Connection: keep-alive'; $header [] = 'User-Agent: ozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1'; $header [] = 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; $header [] = 'Accept-Language: zh-CN,zh;q=0.8'; $header [] = 'Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3'; $header [] = 'Cache-Control:max-age=0'; $header [] = 'Cookie:t_skey=p5gdu1nrke856futitemkld661; t__CkCkey_=29f7d98'; $header [] = 'Content-Type:application/x-www-form-urlencoded'; curl_setopt($curl, CURLOPT_HTTPHEADER, array('Expect:')); curl_setopt ( $curl, CURLOPT_HTTPHEADER, $header ); curl_setopt ( $curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ( $curl, CURLOPT_POSTFIELDS, $post ); $result = curl_exec ( $curl ); //execute the curl method curl_close ( $curl ); } </code>
toaster/sample-code-of-web-interface-of-pns.txt
· 最后更改: 2017/07/14 11:18 (外部編輯)
頁面工具
顯示頁面
修訂記錄
反向鏈接
回到頂部
? Copyright 2012 - 2015
南京西橋科技有限公司
Western Bridge Tech Co., Ltd.
蘇ICP備13039116號-1