Questions tagged [zend-http-client]

Zend_Http_Client provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests.

Zend_Http_Client provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests. Zend_Http_Client supports most simple features expected from an HTTP client, as well as some more complex features such as HTTP authentication and file uploads. Successful requests (and most unsuccessful ones too) return a Zend_Http_Response object, which provides access to the response's headers and body.

62 questions
14
votes
3 answers

Error in cURL request: name lookup timed out

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); …
Abdoljabbar
  • 574
  • 1
  • 6
  • 20
7
votes
2 answers

Install component zf2 using composer

I try to install zf2 component using composer but can't do it because composer always download all framework, what am i doing wrong? Composer version 1beccf9 { ... "repositories": [ { "type": "composer", "url":…
x4nder
  • 89
  • 4
6
votes
1 answer

Content type-error when using Zend_Http_Client

I'm trying to send data to Google Analytic's collector with Zend_Http_Client and POST. I have an array $postParams that's including my tracking-ID, cid and hit types and I add the values of this array to my client via setParameterPost(). Here's the…
Stephan Weinhold
  • 1,623
  • 1
  • 28
  • 37
6
votes
1 answer

Zend_HTTP_Client wont let me POST any data

I have been searching all over stackoverflow and Google for a solution to my problem. I have created two projects with Zend Framework - Project1 and Project2 - and I want to implement web services on one of them. The idea is to send a JSON-string to…
1291
  • 117
  • 1
  • 2
  • 6
4
votes
6 answers

Request headers not being sent with Zend Http

I am making the following request using Zend\Http\Request and Zend\Http\Client //Creating request and client objects $request = new Request(); $client = new Client(); //Preparing Request Object …
HelmBurger
  • 1,168
  • 5
  • 15
  • 35
4
votes
2 answers

guzzle php http client cookies setup

I am trying to migrate from Zend Http Client to Guzzle Http Client. I find Guzzle well featured and easy to use for the most part, But I think it is not well documented when it comes to using Cookie plugin. So my question is how do you set cookies…
krishna
  • 3,547
  • 5
  • 27
  • 29
3
votes
1 answer

authentication using Zend_Http_Client

I'm trying to use Zend_Http_Client to make a simple post request on a site that requires authentication. Everything seems to be correct but I'm still getting a You are not authorized to view this page error. Any ideas what the problem might be? …
yiinewbie
  • 1,055
  • 2
  • 12
  • 19
3
votes
0 answers

Zend_Http_Client Requests failing with Fiddler Proxy

I've written a simple spider to test various things with Fiddler. The script makes a few requests with Zend_Http_Client->request() using the same instance of the Zend_Http_Client class ($client in the example below). When using Fiddler and…
Eric C
  • 971
  • 6
  • 14
2
votes
1 answer

Get HTTP Response code using Zend and Curl

I have a URL that can be accessible via HTTP or HTTPS. I want to send a HEAD or GET request, which ever is fastest and get the response code so I know whether the URL is up or down. How do I do that using Zend_HTTP_Client? I used get_headers()…
Jake
  • 25,479
  • 31
  • 107
  • 168
2
votes
1 answer

How to retrieve full Zend_Http_Client GET URI?

I have something like that: $client = new Zend_Http_Client('http://www.site.com'); $client->setParameterGet(array( 'platform' => $platform, 'clientId' => $clientId, 'deploymentId' => $deploymentId, )); …
user806474
2
votes
1 answer

How to output a list of POST data which Zend_Http_Client will send?

I need to debug my Zend_Http_Client code so that I am sure that I am sending all of the proper POST fields & headers to my server. How can I output the list of the POST fields which will be sent, or even what the entire HTTP command will be?
Jason
  • 14,517
  • 25
  • 92
  • 153
2
votes
1 answer

How to emulate POSTing multiple checkbox form fields myField[] with Zend_Http_Client?

I am using Zend_Http_Client to POST a set of data to my server running PHP. However, the server is expecting data in the form myField[], i.e. I have a set of check boxes and the user can check more than one. My current code is: foreach ($myValues…
Jason
  • 14,517
  • 25
  • 92
  • 153
2
votes
3 answers

Zend_Http_Client and cURL are removing newlines

I'm trying to fetch a CSV file from a remote server and download it Using Zend_Http_Client The fetched version has all of the newlines removed. require_once('Zend/Http/Client.php'); $client = new Zend_Http_Client($url); //also tried the curl adapter…
Yisrael Dov
  • 2,369
  • 1
  • 16
  • 13
2
votes
2 answers

Is it possible to make asynchronous connections with Zend_Http?

Is it possible to make asynchronous connections with Zend_Http? How? Thanks for help.
Stil
  • 21
  • 1
  • 2
2
votes
2 answers

Not able to store the session for the second client request using Zend_Http_Client

I'm sending multiple requests to same client. zend_Http_Client not able to redirect because our site giving a javascript redirect. And from that javascript I'm getting the redirect url and again calling the client , now I'm getting access denied.…
rakesh
  • 21
  • 2
1
2 3 4 5