One Hat Cyber Team
Your IP :
3.145.95.76
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
pass.electronharmony.com
/
fns
/
emoji
/
Edit File:
EmojiText.php
<?php namespace Astrotomic\Emoji; use Astrotomic\Emoji\Concerns\Configurable; use Closure; /** * @internal */ class EmojiText { use Configurable; protected $text; public function __construct(string $text) { $ascii_emojis = [ ':\)' => 'đ', ':D' => 'đ', ':\(' => 'âšī¸', ';\(' => 'đĸ', ':O(?!\S)' => 'đŽ', ':o' => 'đŽ', ':*' => 'đ', ':P' => 'đ', ':p' => 'đ', ';\)' => 'đ', ':\|' => 'đ', ]; foreach ($ascii_emojis as $ascii_emoji => $replacewith) { $regex = '#(?<!\S)('.$ascii_emoji.')(?!\S)#iu'; $text = preg_replace($regex, $replacewith, $text); } //$text = preg_replace(array_keys($ascii_emojis), array_values($ascii_emojis), $text); $this->text = $text; } public function toMarkdown(?Closure $alt = null): string { return $this->replace('', $alt); } public function toHtml(?Closure $alt = null, array $attributes = [], $url = null): string { $attributes = array_merge([ 'width' => 20, 'height' => 20, ], $attributes); $attrs = implode(' ', array_map( fn (string $key, string $value): string => "{$key}=\"{$value}\"", array_keys($attributes), array_values($attributes) )); return $this->replace('<img src="'.$url.'%{src}" alt="%{alt}" '.$attrs.' />', $alt); } protected function replace(string $replacement, ?Closure $alt = null): string { $text = $this->text; $text = preg_replace_callback( $this->regexp(), fn (array $matches): string => str_replace( ['%{alt}', '%{src}'], [ $alt ? $alt($matches[0]) : $matches[0], Emoji::emoji($matches[0]) ->base($this->base) ->type($this->type) ->url(), ], $replacement ), $text ); return $text; } protected function regexp(): string { return '/(?:'.json_decode(file_get_contents(dirname(__FILE__).'/regexp.json')).')/u'; } }
Simpan