php - How to use zend_http_client or curl in right way -


i'm using zend_http_client. want send request transfer(without redirecting) site , send number in field have , answer info need use on site. that's i'm doing, how send number field , submit it?

 $url = 'http://gdeposylka.ru/';                         $config = array(                             'timeout' => 30                         );                         $client = new zend_http_client($url, $config);                         try {                             $response = $client->request('get');                             if ($response->getstatus() == 200) {                                 $ctype = $response->getheader('content-type');                                 $body = $response->getbody();                                 $dom = new zend_dom_query($body);                                 $results = $dom->query('limit');                                 $item->site_k = 1 + (int) $results->current()->textcontent;                                 var_dump($response);                                 exit;                             }                         } catch (zend_http_client_adapter_exception $e) {                          } 

thanks , sorry grammar mistakes.

because there hash on site you're trying send request, wont able done. hash mechanism makes impossible send request straight url stated in action param of form tag. it's designed particulary prevent such action want make. still, since there no captcha can try web automation.

what might find useful ie. selenium http://docs.seleniumhq.org/


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -