The class constructor optionally accepts a URL as its first parameter
(can be either a string or a Zend_Uri_Http object), and an array
or Zend_Config object containing configuration options. Both can
be left out, and set later using the setUri() and setConfig() methods.
Example 459. Instantiating a Zend_Http_Client Object
<?php
$client = new Zend_Http_Client('http://example.org', array(
'maxredirects' => 0,
'timeout' => 30));
// This is actually exactly the same:
$client = new Zend_Http_Client();
$client->setUri('http://example.org');
$client->setConfig(array(
'maxredirects' => 0,
'timeout' => 30));
// You can also use a Zend_Config object to set the client's configuration
$config = new Zend_Config_Ini('httpclient.ini', 'secure');
$client->setConfig($config);
Note
Zend_Http_Client uses
Zend_Uri_Http to validate URLs. This means
that some special characters like the pipe symbol ('|') or the
caret symbol ('^') will not be accepted in the URL by default.
This can be modified by setting the 'allow_unwise' option of
Zend_Uri to 'TRUE'. See this section for more
information.




