コード例 #1
0
ファイル: instapush.php プロジェクト: pushbots/instapush-php
 /**
  * Returns a singleton instance of InstaPush
  * @param $appId		Instapush Applciation Id.
  * @param $appSecret Instapush Application Secret.
  * @return InstaPush
  */
 public static function getInstance($appId, $appSecret, $options = array())
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new InstaPush($appId, $appSecret, $options);
     }
     return self::$_instance;
 }
コード例 #2
0
function instapush_notify($ipappid, $ipappsecret, $event, $time, $reason)
{
    echo "\ninstapush \n";
    //Send notification to instapush, man
    $ip = InstaPush::getInstance($ipappid, $ipappsecret);
    $ip->track($event, array("time" => $time, "reason" => $reason));
}