Ejemplo n.º 1
0
function no_cache()
{
    if (headers_sent()) {
        trigger_error(trigger_message('No-cache can only be set before content starts'), E_USER_WARNING);
        return false;
    }
    header('Pragma: no-cache');
    header('Expires: 0');
    return true;
}
Ejemplo n.º 2
0
 function create_uin($password)
 {
     if ($this->state != 1) {
         trigger_error(trigger_message('Invalid connection-state'), E_USER_WARNING);
         return false;
     }
     $this->newuin = NULL;
     $this->set_snac_handler(23, 1, array(&$this, 'handle_srv_regerror'));
     $this->set_snac_handler(23, 5, array(&$this, 'handle_srv_newuin'));
     $this->send_flap(2, $this->create_snac(23, 4, $this->create_cli_registeruser($password)));
     $this->listen(NULL, 20);
     $this->restore_snac_handler(23, 1);
     $this->restore_snac_handler(23, 5);
     return $this->newuin;
 }