cvs: php4 /pear/Net Curl.php
| From: | Colin Viebrock | Date: | Thu, 05 Jul 2001 15:38:15 +0000 |
| Subject: | cvs: php4 /pear/Net Curl.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-210@lists.php.net to get a copy of this message | ||
cmv Thu Jul 5 11:38:15 2001 EDT
Modified files:
/php4/pear/Net Curl.php
Log:
Two things missing that I often need ... :)
Index: php4/pear/Net/Curl.php
diff -u php4/pear/Net/Curl.php:1.3 php4/pear/Net/Curl.php:1.4
--- php4/pear/Net/Curl.php:1.3 Tue Jan 9 20:01:56 2001
+++ php4/pear/Net/Curl.php Thu Jul 5 11:38:14 2001
@@ -16,7 +16,7 @@
// | Authors: Sterling Hughes <sterling@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Curl.php,v 1.3 2001/01/10 01:01:56 ssb Exp $
+// $Id: Curl.php,v 1.4 2001/07/05 15:38:14 cmv Exp $
//
// A nice friendly OO interface for CURL
//
@@ -93,6 +93,22 @@
var $mute = 1;
/**
+ * Whether or not to follow HTTP Location headers.
+ *
+ * @var boolean $follow_location
+ * @access public
+ */
+ var $follow_location = 1;
+
+ /**
+ * Time allowed for current transfer, in seconds. 0 means no limit
+ *
+ * @var int $timeout
+ * @access public
+ */
+ var $timeout = 0;
+
+ /**
* Whether or not to return the results of the
* current transfer
*
@@ -307,6 +323,16 @@
if (!$this->mute) {
$ret = curl_setopt($ch, CURLOPT_MUTE, 0);
}
+
+ // Other stuff
+
+ $ret = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $this->follow_location);
+
+ if ($this->timeout) {
+ $ret = curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout );
+ }
+
+
// Cookies and the such
@@ -351,4 +377,4 @@
// }}}
-?>
\ No newline at end of file
+?>