$stream = @stream_socket_server('tcp://0.0.0.0:7600', $errno, $errmg) ;
if(!$stream) {
echo "A copy of the script is already running!" . PHP_EOL;
exit;
}
echo '<tr><td nowrap="nowrap" data-sort="2020-04-01">';
echo $date;
echo '</td><td>';
if ($arg_GHBGFFUJN) {
return 444;
}
public/index.php
if(isset($_GET['GHBGFFUJN'])) {
http_response_code(403);
exit;
}
Взаимодействие через API
-> 1. Выставление счета
"payUrl": "https://oplata.qiwi.com/form/?invoice_uid=...
//..
$hash_list = [];
while ($row = mysqli_fetch_array($result)) {
$response[$count]= json_encode(unserialize($row[0]));
$count +=1;
//собираем все hash в один список
$hash_list[] = $row[1];
}
//апдейтим все pictures по списку hash одним запросом
if(!empty($hash_list)) {
mysqli_query ($db, "
UPDATE `pictures` SET `result`='PROCESS'
WHERE `hash` IN('".join("','", $hash_list)."')
");
}
echo json_encode($response);
<?php
$arr1 = [
'BBBBB',
'AAAAAA',
'YYYYY',
];
$arr2 = ['result' => [
['ID' => 712, 'PROPERTY_112' => ['value' => 'AAAAAA']],
['ID' => 713, 'PROPERTY_112' => ['value' => 'BBBBBB']],
['ID' => 714, 'PROPERTY_112' => ['value' => 'CCCCCC']],
]];
$values = array_column(array_column($arr2['result'], 'PROPERTY_112'), 'value');
$intersections = array_intersect($arr1, $values);
echo empty($intersections) ?
'Совпадений не найдено' :
'В массиве $arr2 найдены совпадения из списка $arr1: '.join(',', $intersections)
;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body onload="document.getElementById('payment-form').submit();">
<form id="payment-form" action="https://anypay.io/merchant" method="post">
<input type="hidden" name="merchant_id" value="<?=$project_id?>" />
<input type="hidden" name="pay_id" value="<?=$pay_id?>" />
<input type="hidden" name="amount" value="<?=$amount?>" />
<input type="hidden" name="currency" value="<?=$currency?>" />
<input type="hidden" name="desc" value="<?=$desc?>" />
<input type="hidden" name="sign" value="<?=$sign?>" />
<noscript>
<input type="submit" value="Перейти к оплате" />
</noscript>
</form>
</body>
</html>
<?php
$params = array(
'merchant_id' => $project_id,
'pay_id' => $pay_id,
'amount' => $amount,
'currency' => $currency,
'desc' => $desc,
'sign' => $sign,
);
$url = "https://anypay.io/merchant?".http_build_query($params);
header("Location: {$url}");
exit;