add config port to curl

This commit is contained in:
Ryan X. Charles 2013-12-12 14:05:51 -05:00
parent 0f4a101d50
commit 10a9e7f892
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
$bpconfig_host="bitpay.com"; $bpconfig_host="bitpay.com";
$bpconfig_port=""; $bpconfig_port=443;
$bpconfig_hostAndPort=$bpconfig_host; $bpconfig_hostAndPort=$bpconfig_host;
if (strlen($bpconfig_port)>0) if ($bpconfig_port!=443)
$bpconfig_hostAndPort.=":".$bpconfig_port; $bpconfig_hostAndPort.=":".$bpconfig_port;
?> ?>

View File

@ -24,7 +24,7 @@ function bpCurl($url, $apiKey, $post = false) {
"Authorization: Basic $uname", "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_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_TIMEOUT, 10); curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ; curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;