Skip to content

Instantly share code, notes, and snippets.

View halillusion's full-sized avatar
🪐
working from space

halillusion halillusion

🪐
working from space
View GitHub Profile
@halillusion
halillusion / php_device_dedector.php
Last active March 11, 2021 13:19
PHP Device Dedector
function userAgentDetails($ua)
{
$ua = $ua==null ? $_SERVER['HTTP_USER_AGENT'] : $ua;
$browser = '';
$platform = '';
$b_icon = 'mdi mdi-close-circle';
$p_icon = 'mdi mdi-close-circle';
$browser_list = [
@halillusion
halillusion / Turkish Character Uppercase-Lowercase Function.php
Created July 27, 2018 08:13
Türkçe karakter dönüşümü yapabileceğiniz PHP fonksiyon
<?php
function case_converter( $keyword, $transform='lowercase' ){
$low = array('a','b','c','ç','d','e','f','g','ğ','h','ı','i','j','k','l','m','n','o','ö','p','r','s','ş','t','u','ü','v','y','z','q','w','x');
$upp = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z','Q','W','X');
if( $transform=='uppercase' OR $transform=='u' )
{
$keyword = str_replace( $low, $upp, $keyword );
@halillusion
halillusion / Turkish Character Fixer Function.php
Last active June 21, 2023 12:52
Turkish Character Fixer
<?php
function turkishCharacterFixer($string)
{
// = <0x9d>
// Some Special Characters
$find = ['•', '“', '”', '‘', '’'];
$repl = ['•', '“', '”', '‘', '’'];
@halillusion
halillusion / ulkeler-countries.php
Last active August 6, 2023 11:58
Türkçe Ülke Kod Listesi (Array)
<?php
// Türkçe Ülke AD ve Kodları (Array) @halillusion
$countries = array(
'TR' => 'Türkiye',
'VI' => 'ABD Virgin Adaları',
'AF' => 'Afganistan',
'AX' => 'Aland Adaları',
'DE' => 'Almanya',
@halillusion
halillusion / countries-ulkeler.html
Created March 11, 2017 16:10
Türkçe Ülke Kod Listesi (Select Option)
<select>
<option value="TR">Türkiye</option>
<option value="VI">ABD Virgin Adaları</option>
<option value="AF">Afganistan</option>
<option value="AX">Aland Adaları</option>
<option value="DE">Almanya</option>
<option value="US">Amerika Birleşik Devletleri</option>
<option value="UM">Amerika Birleşik Devletleri Küçük Dış Adaları</option>
<option value="AS">Amerikan Samoası</option>
<option value="AD">Andora</option>