I wrote some code that fill a login form and submit it via post method. Like:
$config = array(
'adapter' => 'Zend_Http_Client_Adapter_Curl',
);
$this->siteObj = new Zend_Http_Client('http://example.com', $config);
$this->siteObj->setCookieJar();
$this->siteObj->setUri('http://example.com/login');
$this->siteObj->setParameterPost( 'data[User][name]', 'user' );
$this->siteObj->setParameterPost( 'data[User][password]', 'password' );
$response = $this->siteObj->request('POST');
its works fine, but some times this error occur:
Error in cURL request: name lookup timed out
Error: An Internal Error Has Occurred.
whats the problem? what can I do to solve it?
I encountered the same problem:
After restarting Apache, it worked. So strange.