browser_id = $myIpBrowser->id; $this->browser_dir = $myIpBrowser->getDir(); $this->data=array(); parent::__construct(); } public function regnerateId() { $this->id=\sha1( \darkphp\randomizer\DwRandomizer::randomize( 10 ) ); } public function sessGet( $key ) { return $this->data[ $key ]; } public function sessSet( $key ,$value ) { $this->data[ $key ] = $value; } public function getFile() { return $this->browser_dir."/sess-".$this->id.".dbphp"; } public function save() { file_put_contents( $this->getFile() , serialize( $this ) ); } } ?>