/** * @param String $blog * @param String $function */ function Read($blog, $function) { parent::Conect(); $this->blog = $blog; $this->function = $function; $this->authenticated = 0; if (in_array($this->function, array('dashboard', 'likes', 'read-authenticated'))) { $this->setPost(true); $this->authenticated = true; if ($this->function === 'read-authenticated') { $function = 'read'; } if ($this->function === 'dashboard') { $this->blog = 'www'; } } $this->setURL($this->blog . ".tumblr.com/api/" . $function); }