Concluído

Script Fix

Hello,

I´m currently running a crawler that uses the phpcrawler php class which works fine with almost all pages/urls, but with certain pages there occurs a problem which basically is that the script stops working without giving any error message or anything like that.

Now an example of a page on such a problem occurs would be:

[url removed, login to view]

Now here would be a demo code, which would simply stop - always at the same page ([url removed, login to view]):

include("classes/phpcrawler.class.php");

class MyCrawler extends PHPCrawler

{

function handlePageData($page_data)

{

echo "Page requested: ".$page_data["url"]."<br>";

echo "Status: ".strtok($page_data["header"], "\n")."<br>";

echo "Referer-page: ".$page_data["referer_url"]."<br>";

if ($page_data["received"]==true)

echo "Content received: ".$page_data["bytes_received"]." bytes";

else

echo "Content not received";

echo str_pad(" ", 5000); // "Force flush", workaround

flush();

}

}

// Klasse laden

$crawler = new MyCrawler();

$crawler->setURL("http://www.ejs-kajak.de");

$crawler->setFollowMode(1);

$crawler->addReceiveContentType("/text\/html/");

$crawler->addNonFollowMatch("/.(jpg|gif|png)$/ i");

$crawler->setCookieHandling(true);

$crawler->setTrafficLimit(0);

$crawler->setPageLimit(0);

$crawler->go();

$report = $crawler->getReport();

print_r($report);

Now the job would be to fix the class, so that this doesn´t happen any more.

Habilidades: PHP

Veja mais: referer url php, fix html error, error on page fix, crawler page_data, fix or now, certain report, url fix, message crawler, crawler report, script function, force gif, php header script, demo works, script message, problem fix, script php html text, php script echo, always running, demo crawler, html page fix, html jpg php script, echo fix url php, png php code, echo script php, header fix

Acerca do Empregador:
( 14 comentários ) Graz, Austria

ID do Projeto: #395684

Concedido a:

eXternalDesign

Kindly see your PM.

$50 USD em 0 dias
(45 Comentários)
6.2

2 freelancers estão ofertando em média $40 para esse trabalho

Ciprian79

If you agree I will take a look at your scripts

$30 USD em 1 dia
(0 Comentários)
0.0