verifyssl = false; } public function getMimeType(): string { switch (strtolower($this->format)) { case 'p': return 'image/png'; case 'g': return 'image/gif'; case 'j': return 'image/jpeg'; } throw new QRException(sprintf('Unknown MIME-type: %s', $this->format)); } public function getQRCodeImage(string $qrtext, int $size): string { return $this->getContent($this->getUrl($qrtext, $size)); } public function getUrl(string $qrtext, int $size): string { return 'http://qrickit.com/api/qr' . '?qrsize=' . (string) $size . '&e=' . strtolower($this->errorcorrectionlevel) . '&bgdcolor=' . $this->bgcolor . '&fgdcolor=' . $this->color . '&t=' . strtolower($this->format) . '&d=' . rawurlencode($qrtext); } }