daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Dec 11th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.  * "Happy Birthday, Alexander!"
  4.  *
  5.  * $Hb = new Hb;
  6.  * $Hb->main();
  7.  */
  8. class Hb
  9. {
  10.     protected $HbText = "01001000 01100001 01110000 01110000 01111001 00100000 01000010 01101001 01110010 01110100 01101000 01100100 01100001 01111001 00101100 00100000 01000001 01101100 01100101 01111000 01100001 01101110 01100100 01100101 01110010 00100001";
  11.     protected $HbTextDefault = "01000111 01110010 01100101 01100001 01110100 00100000 01000100 01100001 01111001 00100001";
  12.     protected $HbDate = "2017-12-08";
  13.    
  14.     public function getHbText()
  15.     {
  16.         return $this->HbText;
  17.     }
  18.     public function getHbTextDefault()
  19.     {
  20.         return $this->HbTextDefault;
  21.     }
  22.    
  23.     protected function getTodayText() {
  24.         return date("Y-m-d") == $this->HbDate
  25.             ? $this->getHbText()
  26.             : $this->getHbTextDefault();
  27.     }
  28.    
  29.     public static function main() {
  30.         $it = new static;
  31.         while (1) {
  32.             // Congratulate at 10am
  33.             if (date("H") == "10") {
  34.                 echo $it->getTodayText();
  35.             }
  36.             sleep(3600);
  37.         }
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top