⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.89
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Url
/
Edit File: Data.php
<?php /** * Copyright 2013-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @copyright 2013-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @package Url */ /** * An object to handle Data URLs (RFC 2397). * * @author Michael Slusarz <slusarz@horde.org> * @category Horde * @copyright 2013-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @package Url */ class Horde_Url_Data { /** * Should data be base64 encoded? * * @var boolean */ public $base64 = true; /** * Binary data. * * @var string */ public $data = ''; /** * The MIME type. * * @var string */ public $type = 'application/octet-stream'; /** * Create a new object from existing data. * * @param string $type The MIME type of the data. * @param string $data The data. * @param boolean $base64 Should data be base64 encoded? */ public static function create($type = null, $data = null, $base64 = true) { $ob = new self(); if (!is_null($type)) { $ob->type = $type; } if (!is_null($data)) { $ob->data = $data; } $ob->base64 = (bool)$base64; return $ob; } /** * Check input to see if it contains RFC 2397 data. * * @since 2.2.0 * * @param mixed $data Input. * * @return boolean True if the input contains RFC 2397 compliant data. */ public static function isData($input) { if (is_object($input)) { return ($input instanceof self); } return (is_string($input) && (strpos($input, 'data:') === 0)); } /** * Constructor. * * @param string $data An RFC 2397 compliant data string. */ public function __construct($data = null) { if (!is_null($data) && self::isData($data) && ($fp = @fopen(strval($data), 'r'))) { $this->data = stream_get_contents($fp); $meta = stream_get_meta_data($fp); $this->type = $meta['mediatype']; fclose($fp); } } /** * Output RFC 2397 compliant data string. */ public function __toString() { return 'data:' . htmlspecialchars($this->type) . ($this->base64 ? ';base64,' . base64_encode($this->data) : ',' . rawurlencode($this->data)); } }
Simpan