This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function protectMail($mail, $addMailTo = true) | |
{ | |
$result = ''; | |
$mail = ($addMailTo ? 'mailto:' : '') . $mail; | |
for ($i = 0; $i < strlen($mail); $i++) { | |
$result .= '&#' . ord(substr($mail, $i, 1)) . ';'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
set_exception_handler(function (Exception $exception) { | |
$i = 0; | |
foreach ($exception->getTrace() as $frame) { | |
echo sprintf("#%d %s(%d): %s(%s)\n", | |
$i++, $frame["file"], $frame["line"], | |
$frame["function"], | |
implode(", ", array_map( | |
function ($e) { | |
return var_export($e, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rss_url": "https://ncore.cc/rss.php?key=", | |
"save_path": "_files", | |
"downloads": { | |
"sorozat_hun_sd": [ | |
"Barátok Közt" | |
], | |
"sorozat_eng_sd": [ | |
"The Flash", | |
"^The 100.+hdtv", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class SimpleResponseMinify | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param ${TYPE_HINT} $${PARAM_NAME} | |
*/ | |
#if (${TYPE_HINT} == "int" || ${TYPE_HINT} == "integer" || ${TYPE_HINT} == "bool" || ${TYPE_HINT} == "boolean" || ${TYPE_HINT} == "float" || ${TYPE_HINT} == "double" || ${TYPE_HINT} == "real" || ${TYPE_HINT} == "string") | |
public ${STATIC} function set${NAME}($${PARAM_NAME}) | |
#else | |
public ${STATIC} function set${NAME}(${TYPE_HINT} $${PARAM_NAME}) | |
#end | |
{ | |
#if (${STATIC} == "static") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); | |
header("Cache-Control: post-check=0, pre-check=0", false); | |
header("Pragma: no-cache"); | |
/** | |
* IP lekérdezése | |
**/ | |
function getIp() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/********************************************************************************************************************** | |
* Kilistazza a megadhato mozineveket es az eppen elerheto filmek cimeit, azonositokkal egyutt. | |
**********************************************************************************************************************/ | |
$presentations = json_decode(file_get_contents('http://www.cinemacity.hu/presentationsJSON'), true); | |
if (!is_array($presentations) && (count($presentations) === 0 || empty($presentations['sites']) || !is_array($presentations['sites']))) { | |
die('Adatok beolvasasa sikertelen.'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function pingSearchEngines($sitemap, $service) | |
{ | |
$ping = ''; | |
switch (strtolower($service)) { | |
case 'google': | |
$ping = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=[SITEMAP]'; | |
break; | |
case 'bing': |