In my localhost it work correctly but when it uploaded on my shared hosting it shows curl errors "Failed to connect to domain.com port 9081: Connection refused" .
Others curl request works fine on my shared host.
Anyone can give a solution?
My curl request is below
Others curl request works fine on my shared host.
Anyone can give a solution?
My curl request is below
PHP:
$bkash_url = "https://www.domain.com:9081/dreamwave/merchant/trxcheck/sendmsg?user=<USENAME>&pass=<PASSWORD>&msisdn=<MERCHANT_NUMBER>&trxid=<TRANSACTION_ID>"";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_PORT => 9081,
CURLOPT_URL => $bkash_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
Last edited by a moderator: