Implement setInterface()

Implement Curl::setInterface() and MultiCurl::setInterface()
This commit is contained in:
harry
2020-04-10 12:02:41 +05:30
parent 73ec46ed20
commit 09006e0e26
3 changed files with 30 additions and 0 deletions
+2
View File
@@ -284,6 +284,7 @@ Curl::setRetry($mixed)
Curl::setTimeout($seconds)
Curl::setUrl($url, $mixed_data = '')
Curl::setUserAgent($user_agent)
Curl::setInterface($interface)
Curl::setXmlDecoder($mixed)
Curl::success($callback)
Curl::unsetHeader($key)
@@ -335,6 +336,7 @@ MultiCurl::setRetry($mixed)
MultiCurl::setTimeout($seconds)
MultiCurl::setUrl($url)
MultiCurl::setUserAgent($user_agent)
MultiCurl::setInterface($interface)
MultiCurl::setXmlDecoder($mixed)
MultiCurl::start()
MultiCurl::success($callback)
+14
View File
@@ -1222,6 +1222,20 @@ class Curl
$this->setOpt(CURLOPT_USERAGENT, $user_agent);
}
/**
* Set Interface
*
* The name of the outgoing network interface to use.
* This can be an interface name, an IP address or a host name.
*
* @access public
* @param $interface
*/
public function setInterface($interface)
{
$this->setOpt(CURLOPT_INTERFACE, $interface);
}
/**
* Attempt Retry
*
+14
View File
@@ -787,6 +787,20 @@ class MultiCurl
$this->setOpt(CURLOPT_USERAGENT, $user_agent);
}
/**
* Set Interface
*
* The name of the outgoing network interface to use.
* This can be an interface name, an IP address or a host name.
*
* @access public
* @param $interface
*/
public function setInterface($interface)
{
$this->setOpt(CURLOPT_INTERFACE, $interface);
}
/**
* Start
*