curl_setopt($curl, CURLOPT_COOKIEFILE, "");
$cookies = curl_getinfo($curl, CURLINFO_COOKIELIST);
curl_setopt($curl, CURLOPT_COOKIE, $newCookies);
http-URI = "http:" "//" authority path-abempty [ "?" query ]
[ "#" fragment ]
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
ALPHA := [A-Za-z]
DIGIT := [0-9]
HEXDIG := [0-9A-F]
Шаг 1.
$i = 0.
Удаляем атрибут 0.
Атрибуты 1 и 2 получают номера 0 и 1.
Шаг 2.
$i = 1.
Удаляем атрибут 1.
Остался атрибут 0.
foreach ($this->allowableTags as $tag) {
foreach ($doc->getElementsByTagName($tag) as $element) {
$attributes = $element->attributes;
while ($attributes->length > 0) {
$attr = $attributes->item(0);
$this->clearElement($element, $attr);
}
}
}