我写了一些填写登录表单的代码,并通过post方式提交.喜欢:
$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');
它的工作很好,但有些时候这个错误发生:
Error in cURL request: name lookup timed out Error: An Internal Error Has Occurred.
有什么问题?我该怎么办才能解决呢?