Hi,
I have a problem with POST data to some urls that when run $crawler->go, the report object is like : [links_followed] => 1 [files_received] => 0 [bytes_received] => 0
...
The site is asp and make some requests with ajax that in every request some form data such as VIEWSTATE, STATEVALIDATION ,etc must send to retrieve the next page.
The code is:
protected function _init(){
$this->crawler->setURL($this->url);
$this->crawler->setStreamTimeout(15); // defaults to 2 seconds
$this->crawler->setConnectionTimeout(20); // defaults to 5 seconds
$this->crawler->enableCookieHandling(true);
//This rules lets the crawler receive the content/source of pages with the Content-Type "text/html"
//Other pages or files with different content-types (e.g. "image/gif") won't be received
$this->crawler->addContentTypeReceiveRule("#text/html#");
$this->crawler->addURLFilterRule("#\.(jpg|jpeg|gif|png)$# i");
$this->crawler->addURLFilterRule("#\.(css|js)$# i");
$this->__setProxyAndAgent();
}
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi,
I have a problem with POST data to some urls that when run $crawler->go, the report object is like :
[links_followed] => 1
[files_received] => 0
[bytes_received] => 0
...
The site is asp and make some requests with ajax that in every request some form data such as VIEWSTATE, STATEVALIDATION ,etc must send to retrieve the next page.
The code is:
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
$this->crawler->plainContent is a variable that store $pageInfo->source.
In this code in every two steps i use one crawler object.
but in the last line of code (debug($this->crawler->plainContent, 1);) the plain content is empty.
Can anyone please help me ?
Thank you.
Last edit: Anonymous 2015-06-06
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
help