add config port to curl
This commit is contained in:
parent
0f4a101d50
commit
10a9e7f892
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$bpconfig_host="bitpay.com";
|
||||
$bpconfig_port="";
|
||||
$bpconfig_port=443;
|
||||
$bpconfig_hostAndPort=$bpconfig_host;
|
||||
if (strlen($bpconfig_port)>0)
|
||||
if ($bpconfig_port!=443)
|
||||
$bpconfig_hostAndPort.=":".$bpconfig_port;
|
||||
?>
|
||||
|
|
|
@ -24,7 +24,7 @@ function bpCurl($url, $apiKey, $post = false) {
|
|||
"Authorization: Basic $uname",
|
||||
);
|
||||
|
||||
curl_setopt($curl, CURLOPT_PORT, 443);
|
||||
curl_setopt($curl, CURLOPT_PORT, $bpconfig_port);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
|
||||
|
|
Loading…
Reference in New Issue