SnapchatAgent::timestamp PHP Method

timestamp() public method

Returns the current timestamp.
public timestamp ( ) : integer
return integer The current timestamp, expressed in milliseconds since epoch.
    public function timestamp()
    {
        return intval(microtime(TRUE) * 1000);
    }

Usage Example

コード例 #1
0
ファイル: snapchat.php プロジェクト: sadiqhirani/php-snapchat
 /**
  * Updates the current user's email address.
  *
  * @param string $email
  *   The new email address.
  *
  * @return bool
  *   TRUE if successful, FALSE otherwise.
  */
 public function updateEmail($email)
 {
     // Make sure we're logged in and have a valid access token.
     if (!$this->auth_token || !$this->username) {
         return FALSE;
     }
     $timestamp = parent::timestamp();
     $result = parent::post('/settings', array('action' => 'updateEmail', 'email' => $email, 'timestamp' => $timestamp, 'username' => $this->username), array($this->auth_token, $timestamp));
     return isset($result->param) && $result->param == $email;
 }
All Usage Examples Of SnapchatAgent::timestamp