Hi,
I am trying to use Zend_Http_Client to fetch a specific page (www . nu . nl) I am using this code
$client = new Zend_Http_Client($url,
array(
'maxredirects' => 5,
'timeout' => 30,
'useragent' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801 '
)
);
$code = $client->request("GET");
$pageBody = $code->getBody();
For this specific site, $pagebody
is empty (0). Using xdebug, it seems that it fetches the encoded response but fails on the decoding. Also, and this is wierd to me, sometimes it works with no problem!
I would appreciate any thoughts on how to solve this.
Thank you.