function getcontents($url){
if(filter_var($url,FILTER_VALIDATE_URL)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
// ssl?
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
return file_get_contents($url);
}
echo getcontents('https://www.rusprofile.ru/id/11597949');
exec();
ну или вообще модуль для phpexec();
exec();
$a = [
[
'name' => 'Название 1',
'price' => 140,
],
[
'name' => 'Название 2',
'price' => 140,
]
];
$b = [2, 10];
$result = array_map(fn($item, $qty) => $item + ['quantity' => $qty], $a, $b);
$result = array_map(function ($item, $qty) {
return $item + ['quantity' => $qty];
}, $a, $b);
<?php
$users = [
[
"userUuid" => "032b83b4-3ad8-33fd-abd3-bfafc5eb23ba",
"name" => "Илья",
],
[
"userUuid" => "59281d2d-d81e-3556-956b-f354fd5e24a9",
"name" => "Олег",
],
];
$resources = [
['user_id' => '59281d2d-d81e-3556-956b-f354fd5e24a9', 'processed' => 145, 'assigned' => 167],
['user_id' => 'e9f60f90-3096-3848-b3e6-094e81f9b022', 'processed' => 15, 'assigned' => 177],
];
$result = array_map(function($user) use ($resources) {
$second = array_filter($resources, function($resource) use ($user) {
return $resource['user_id'] === $user['userUuid'];
});
return array_merge(
$user,
count($second) ? $second[0]: []
);
}, $users);
var_dump($result);
$result = array_map(function($user) use ($resources) {
return array_merge(
$user,
...array_filter($resources, fn($resource) => $resource['user_id'] === $user['userUuid'])
);
}, $users);
var_dump($result);
$result = array_map(fn($u) => array_merge($u, ...array_filter($resources, fn($r) => $r['user_id'] === $u['userUuid'])), $users);
var_dump($result);
wp-
(wp-style/style.css или css/wp-my.css)То и голый html определят, как WP ))<link rel="preload" as="script" href="https://static.chrono24.com/lib/generated/js/vendors~_productsearch.wp~_questionary.wp~_rating.wp~dealer-area-dashboard~dealer-area-inbox~dealer-~8fc578f4.bf1a4675bd876777da3c.js" crossorigin="anonymous" />
<link rel="preload" as="script" href="https://static.chrono24.com/lib/generated/js/vendors~_productsearch.wp~_questionary.wp~_rating.wp~dealer-area-dashboard~dealer-area-inbox~dealer-~281d92d7.8e1b2fe9b3aad28744cd.js" crossorigin="anonymous" />
wp~
куски от webpack<footer>
<div class="content">
Тут контент и прочая ересь
</div>
</footer>
footer {
height: 150px;
background-image: url(https://img.gazeta.ru/files3/649/13056649/smesha-pic4_zoom-1500x1500-92995.jpg);
background-position: center;
}
.content {
display: flex;
justify-content: center;
align-items: center;
color: #ff0000;
height: 100%;
}