0

I have the following code:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"http://accountgm.moonton.com:37001");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'blabla');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$server_output = curl_exec ($ch);

curl_close ($ch);

echo $server_output;

The output is blank, but I'm not sure why. Would appreciate guidance.

garrettmurray
  • 3,338
  • 1
  • 25
  • 23

1 Answers1

0

It is possible that your ISP blocks non-"generic" ports. My ISP does this (I'm using Telkom's Indihome, I live in Jakarta), and it blocks all ports but 80 (http) and 443 (https).

When it did so, all connections to custom ports are blocked and will return blank response (or just timeout).

Solution? Use VPN or just switch to another ISP. Or just complaint to the support.

Wiguno
  • 66
  • 5
  • Saya juga menggunakan telkom, area depok. Sudah menggunakan vpn, tetapi hasilmya nihil. Apakah harus menggunakan socks?? – ALFIAN ANANDA PUTRA Jan 02 '18 at 00:56
  • I think we need to use English here. Just in case, let me ask, did you already configure the PHP to use the VPN connection? One way to test is to fetch the remote IP through PHP and compare it to the VPN's remote IP. – Wiguno Jan 02 '18 at 14:11
  • Oh, sorry. I get the information that it is affected by the hosting used, whether the hosting is blocking a particular port or not. btw i use domainesia hosting – ALFIAN ANANDA PUTRA Jan 02 '18 at 14:38