Skip to content

Commit 5231bf4

Browse files
committed
Merge pull request php-curl-class#194 from SwelenFrance/master
Add method setPort()
2 parents b7f1ebb + 5907863 commit 5231bf4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Curl/Curl.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,17 @@ public function setCookie($key, $value)
539539
$this->setOpt(CURLOPT_COOKIE, str_replace(' ', '%20', urldecode(http_build_query($this->cookies, '', '; '))));
540540
}
541541

542+
/**
543+
* Set Port
544+
*
545+
* @access public
546+
* @param $port
547+
*/
548+
public function setPort($port)
549+
{
550+
$this->setOpt(CURLOPT_PORT, intval($port));
551+
}
552+
542553
/**
543554
* Set Cookie File
544555
*

0 commit comments

Comments
 (0)