- 1
За "PHP".
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
За "PHP".
0
1) Протухает сертификат
2) С горящей жопой бежишь его обновлять
3) Делаешь мониторинг: отправляешь письмо, если сертификат скоро протухнет
4) Отправка письма ломается
5) Go to 1
0
<?php
function filter($var, $type)
{
switch ($type[0])
{
case 1: $var = 'intval('.$var.')';
break;
case 2: $var = 'trim('.$var.')';
break;
}
switch ($type[1])
{
case 1: $var = 'intval('.$var.')';
break;
case 2: $var = 'trim('.$var.')';
break;
}
return $var;
}
$var3 = 233;
echo filter($var3, [1,2]);
?>
Шедевр:
https://php.ru/forum/threads/nuzhna-pomosch-po-kodu.101533
0
/**
* Hash a value according to FraudRecord specifications
*
* @param string $value
* @param bool $prepare password is treated differently
* @return string
*/
function hash($value, $prepare = true)
{
if($prepare) {
$value = trim($value);
$value = strtolower($value);
$value = str_replace(" ", "", $value);
}
for($i = 0; $i < 32000; $i++)
$value = sha1("fraudrecord-".$value);
return $value;
}
Безопасность в безопасности от безопасности
https://github.com/splitice/fraudrecord-api/blob/master/src/Splitice/FraudRecord/FraudRecordApi.php#L58
−1
if (isset($args['filter']['birthdate'])) {
$birthdate = $args['filter']['birthdate'];
$filters['birthdate'] = [];
if (!empty($birthdate['to'])) {
$filters['birthdate']['$lte'] = $birthdate['to'];
}
if (!empty($birthdate['from'])) {
$filters['birthdate']['$gte'] = $birthdate['from'] + 86399;
}
}
нельзя описать то, что уже обоссано
0
include( 'includes/systems/header.inc' ); #Подключение Заголовка
@list($wdth,$hght) = getImageSize( $_GET['photo'] );
while( ( $wdth > $_SESSION['wdth']-100 ) || ( $hght > $_SESSION['hght']-100 ) ){
$wdth = $wdth / 1.00001;
$hght = $hght / 1.00001;
}
# echo $wdth . 'x' . $hght ;
# $hghtP = $hght - 85;
# $wdthP = $wdth - 85;
$hghtP = $hght;
$wdthP = $wdth;
@$prms = ( $wdth > $hght )? 'width=' . (int)$wdthP: 'height=' . (int)$hghtP;
# echo $wdth . 'x' . $hght;
photo.php
+1
function gk_nitter_filter($url) {
$url = preg_replace('/https?:\/\/(?:mobile\.)?twitter\.com\/(\S*)/', 'https://nitter.kavin.rocks/$1', $url);
$url = preg_replace('/https?:\/\/pbs\.twimg\.com\/(\S+)\?format=(\w+)(\S*)/', 'https://nitter.kavin.rocks/pic/$1.$2', $url);
$url = preg_replace('/https?:\/\/pbs\.twimg\.com\/(\S*)/', 'https://nitter.kavin.rocks/pic/$1', $url);
return $url;
}
НИТТЕР КАВИН РОКС!
−2
А ведь были времена.
0
$result5 = dbquery("SELECT MAX(ID) FROM okb_db_itrzadan_statuses where ((ID_edo='".$render_row['ID']."') and (STATUS='Выполнено')) ");
$name5 = mysql_fetch_row($result5);
$total5 = $name5[0];
$result5 = dbquery("SELECT * FROM okb_db_itrzadan_statuses where (ID='".$total5."') ");
$name5 = mysql_fetch_array($result5);
$result6 = dbquery("SELECT * FROM okb_db_itrzadan where (ID='".$render_row['ID']."') ");
$name6 = mysql_fetch_array($result6);
//// дни
if ($name6['DATE_PLAN'][6] == 0) $name6_6 = $name6['DATE_PLAN'][7];
if ($name6['DATE_PLAN'][6] == 1) $name6_6 = $name6['DATE_PLAN'][7] + 10;
if ($name6['DATE_PLAN'][6] == 2) $name6_6 = $name6['DATE_PLAN'][7] + 20;
if ($name6['DATE_PLAN'][6] == 3) $name6_6 = $name6['DATE_PLAN'][7] + 30;
if ($name5['DATA'][6] == 0) $name5_6 = $name5['DATA'][7];
if ($name5['DATA'][6] == 1) $name5_6 = $name5['DATA'][7] + 10;
if ($name5['DATA'][6] == 2) $name5_6 = $name5['DATA'][7] + 20;
if ($name5['DATA'][6] == 3) $name5_6 = $name5['DATA'][7] + 30;
//// мес¤цы
if ($name6['DATE_PLAN'][5] == 1) $name6_d = 31;
if ($name6['DATE_PLAN'][5] == 2) $name6_d = 59;
if ($name6['DATE_PLAN'][5] == 3) $name6_d = 90;
if ($name6['DATE_PLAN'][5] == 4) $name6_d = 120;
if ($name6['DATE_PLAN'][5] == 5) $name6_d = 151;
if ($name6['DATE_PLAN'][5] == 6) $name6_d = 181;
if ($name6['DATE_PLAN'][5] == 7) $name6_d = 212;
if ($name6['DATE_PLAN'][5] == 8) $name6_d = 243;
if ($name6['DATE_PLAN'][5] == 9) $name6_d = 273;
if (($name6['DATE_PLAN'][5] == 0) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 304;
if (($name6['DATE_PLAN'][5] == 1) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 334;
if (($name6['DATE_PLAN'][5] == 2) and ($name6['DATE_PLAN'][4] == 1)) $name6_d = 365;
if ($name5['DATA'][5] == 1) $name5_d = 31;
if ($name5['DATA'][5] == 2) $name5_d = 62;
if ($name5['DATA'][5] == 3) $name5_d = 90;
if ($name5['DATA'][5] == 4) $name5_d = 121;
if ($name5['DATA'][5] == 5) $name5_d = 151;
if ($name5['DATA'][5] == 6) $name5_d = 182;
if ($name5['DATA'][5] == 7) $name5_d = 212;
if ($name5['DATA'][5] == 8) $name5_d = 243;
if ($name5['DATA'][5] == 9) $name5_d = 274;
if (($name5['DATA'][5] == 0) and ($name5['DATA'][4] == 1)) $name5_d = 304;
if (($name5['DATA'][5] == 1) and ($name5['DATA'][4] == 1)) $name5_d = 335;
if (($name5['DATA'][5] == 2) and ($name5['DATA'][4] == 1)) $name5_d = 365;
//// столетие
if ($name6['DATE_PLAN'][2] == 0) $name6_2 = $name6['DATE_PLAN'][3];
if ($name6['DATE_PLAN'][2] == 1) $name6_2 = $name6['DATE_PLAN'][3] + 10;
if ($name6['DATE_PLAN'][2] == 2) $name6_2 = $name6['DATE_PLAN'][3] + 20;
if ($name6['DATE_PLAN'][2] == 3) $name6_2 = $name6['DATE_PLAN'][3] + 30;
if ($name6['DATE_PLAN'][2] == 4) $name6_2 = $name6['DATE_PLAN'][3] + 40;
if ($name6['DATE_PLAN'][2] == 5) $name6_2 = $name6['DATE_PLAN'][3] + 50;
if ($name6['DATE_PLAN'][2] == 6) $name6_2 = $name6['DATE_PLAN'][3] + 60;
if ($name6['DATE_PLAN'][2] == 7) $name6_2 = $name6['DATE_PLAN'][3] + 70;
if ($name6['DATE_PLAN'][2] == 8) $name6_2 = $name6['DATE_PLAN'][3] + 80;
if ($name6['DATE_PLAN'][2] == 9) $name6_2 = $name6['DATE_PLAN'][3] + 90;
if ($name5['DATA'][2] == 0) $name5_2 = $name5['DATA'][3];
if ($name5['DATA'][2] == 1) $name5_2 = $name5['DATA'][3] + 10;
if ($name5['DATA'][2] == 2) $name5_2 = $name5['DATA'][3] + 20;
if ($name5['DATA'][2] == 3) $name5_2 = $name5['DATA'][3] + 30;
if ($name5['DATA'][2] == 4) $name5_2 = $name5['DATA'][3] + 40;
if ($name5['DATA'][2] == 5) $name5_2 = $name5['DATA'][3] + 50;
if ($name5['DATA'][2] == 6) $name5_2 = $name5['DATA'][3] + 60;
if ($name5['DATA'][2] == 7) $name5_2 = $name5['DATA'][3] + 70;
if ($name5['DATA'][2] == 8) $name5_2 = $name5['DATA'][3] + 80;
if ($name5['DATA'][2] == 9) $name5_2 = $name5['DATA'][3] + 90;
echo (($name5_6-$name6_6)+($name5_d-$name6_d-1))+($name5_2*365-$name6_2*365)+1;
0
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/usr/local/www/apache24/data/monitoring/msearch.php</b> on line <b>102</b><br />
monitoring.search( '<table border="0" cellspacing="0" cellpadding="0">\
<tr><td colspan="3" class="title"><b>Интернет магазин : Avito </b></td></tr>\
<tr><td>Номер отправления : <span>xxxx</span></td><td> </td><td></td></tr>\
<tr><td colspan=2>Срок хранения заказа : до включительно</td><td>Осталось дней : </td></tr>\
<tr><td>Текущий статус : Передан курьеру для доставки на сортировочный центр\
<div style="padding:5px 0">Дата доставки : </div>\
</td>\
<td> </td><td>SMS сообщение:<br/> Доставлено<div></div></tr>\
<tr><td>Терминал доставки : Постамат: PickPoint: [данные удалены]…</form>' );
https://pickpoint.ru/monitoring/