Answer the question
In order to leave comments, you need to log in
Why does a 500 Internal Privoxy Error pop up?
There is an online store parser:
<?php
set_time_limit(0);
$time1 = time();
include_once 'simple_html_dom.php';
$url='http://www.felix.ru';
//load mainpage
$html = new simple_html_dom();
$html -> load_file($url);
$category = [];
$subcategory = [];
$item = [];
foreach ($html -> find('a.Depth, a.Depth2') as $e) {
$category[] = $url . $e->href;
}
$html->clear();
unset($html);
foreach ($category as $link) {
$html = new simple_html_dom();
$html -> load_file($link);
foreach ($html -> find('div.CatalogList div.Version2 a[!style]') as $link1) {
$subcategory[] = $url . $link1->href;
}
}
foreach ($subcategory as $link) {
$html = new simple_html_dom();
$html -> load_file($link);
do {
$x = null;
foreach ($html -> find('a.ItemLink') as $link) {
$item[] = $url . $link1->href;
}
foreach ($html -> find('a.bigpage[plaintext=вперед]') as $a) {
$a->href = str_replace('&', '&', $a->href);
$x = $a->plaintext;
$html -> load_file('http://www.felix.ru' . $a->href);
}
}
while ($x=='вперед');
}
var_dump ($item);
$time2 = time()-$time1;
echo '<br>' . $time2 . ' секунд';
500 Internal Privoxy Error
Privoxy encountered an error while processing your request:
Could not load template file connection-timeout or one of its included components.
Please contact your proxy administrator.
If you are the proxy administrator, please put the required file(s) in the (confdir)/templates directory. The location of the (confdir) directory is specified in the main Privoxy config file. (It's typically the Privoxy install directory).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question