예제 #1
0
파일: Identity.php 프로젝트: 25564/Resume
 public function __construct()
 {
     $this->IP = \Connection::IP();
     //Allows for spoofing IP
     $refKey = $this->getKey();
     if ($refKey != false) {
         $Key = new Key($refKey);
         if ($Key->validKey($refKey)) {
             $Company = $this->getCompany($Key);
             Tracker::Create($refKey, $Company);
             $this->Valid = true;
         } else {
             Tracker::Clear();
             throw new \Exception("Key is Invalid");
         }
     } else {
         throw new \Exception("No Key");
     }
 }