function curl_file($url, $cookie = 'coockie', $post = '', $xhr = '') {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
if ($post) {
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
if ($xhr) {
preg_match('|csrftoken(.*)|', file_get_contents('coockie'), $csrf);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-CSRFToken:' . trim($csrf[1]), 'X-Instagram-AJAX:1', 'X-Requested-With:XMLHttpRequest'));
}
$file = curl_exec($ch);
curl_close($ch);
return $file;
}
curl_file('https://instagram.com/accounts/login/ajax/', 'coockie', 'username=Имя&password=Пароль', 1);
echo curl_file('https://instagram.com/', 'coockie', 0, 1); //Выйдет твоя страничка
, где $arItem['ID'] - ID товара
$strElementEdit = CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_EDIT");
$strElementDelete = CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_DELETE");
$arElementDeleteParams = array("CONFIRM" => GetMessage('CT_BCS_TPL_ELEMENT_DELETE_CONFIRM'));
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], $strElementEdit);
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], $strElementDelete, $arElementDeleteParams);
по каким признакам, кроме падения скорости
inkvizitor68sl@isera:~$ host -v -t NS .
Trying "."
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34596
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 190148 IN NS k.root-servers.net.
. 190148 IN NS j.root-servers.net.
. 190148 IN NS a.root-servers.net.
. 190148 IN NS h.root-servers.net.
. 190148 IN NS g.root-servers.net.
. 190148 IN NS l.root-servers.net.
. 190148 IN NS b.root-servers.net.
. 190148 IN NS i.root-servers.net.
. 190148 IN NS d.root-servers.net.
. 190148 IN NS c.root-servers.net.
. 190148 IN NS e.root-servers.net.
. 190148 IN NS m.root-servers.net.
. 190148 IN NS f.root-servers.net.
;; ADDITIONAL SECTION:
a.root-servers.net. 589225 IN A 198.41.0.4
a.root-servers.net. 589225 IN AAAA 2001:503:ba3e::2:30
b.root-servers.net. 335673 IN A 192.228.79.201
b.root-servers.net. 213280 IN AAAA 2001:500:84::b
c.root-servers.net. 463106 IN A 192.33.4.12
c.root-servers.net. 146224 IN AAAA 2001:500:2::c
d.root-servers.net. 463106 IN A 199.7.91.13
d.root-servers.net. 383665 IN AAAA 2001:500:2d::d
e.root-servers.net. 463106 IN A 192.203.230.10
f.root-servers.net. 463106 IN A 192.5.5.241
f.root-servers.net. 81903 IN AAAA 2001:500:2f::f
g.root-servers.net. 463106 IN A 192.112.36.4
h.root-servers.net. 335673 IN A 128.63.2.53
Received 496 bytes from 127.0.1.1#53 in 4 ms
inkvizitor68sl@isera:~$ host -v -t NS ru. 198.41.0.4
Trying "ru"
Using domain server:
Name: 198.41.0.4
Address: 198.41.0.4#53
Aliases:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40869
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 5, ADDITIONAL: 10
;; QUESTION SECTION:
;ru. IN NS
;; AUTHORITY SECTION:
ru. 172800 IN NS f.dns.ripn.net.
ru. 172800 IN NS e.dns.ripn.net.
ru. 172800 IN NS d.dns.ripn.net.
ru. 172800 IN NS b.dns.ripn.net.
ru. 172800 IN NS a.dns.ripn.net.
;; ADDITIONAL SECTION:
f.dns.ripn.net. 172800 IN A 193.232.156.17
f.dns.ripn.net. 172800 IN AAAA 2001:678:14:0:193:232:156:17
e.dns.ripn.net. 172800 IN A 193.232.142.17
e.dns.ripn.net. 172800 IN AAAA 2001:678:15:0:193:232:142:17
d.dns.ripn.net. 172800 IN A 194.190.124.17
d.dns.ripn.net. 172800 IN AAAA 2001:678:18:0:194:190:124:17
b.dns.ripn.net. 172800 IN A 194.85.252.62
b.dns.ripn.net. 172800 IN AAAA 2001:678:16:0:194:85:252:62
a.dns.ripn.net. 172800 IN A 193.232.128.6
a.dns.ripn.net. 172800 IN AAAA 2001:678:17:0:193:232:128:6
Received 332 bytes from 198.41.0.4#53 in 46 ms