unable to read PHP cURL result. var_dump works, but unable to pass it to variable

I have cURL function which reads remote json data. It works with many servers just fine, but now I need to use it on one specific website and it does not pass data to variable. I can still var_dump it or just simply echo it and it sends me to that website.

this is my remote server side code (simple just for here):

<?php echo json_encode(['test'=>'test']);?> 

this is my receiving end:

<?php    
        $ch = curl_init();
        $curlConfig = array(
            CURLOPT_URL            => 'http://binance99.unaux.com/index.php',
            CURLOPT_RETURNTRANSFER => true
        );
        curl_setopt_array($ch, $curlConfig);
        $r = curl_exec($ch);
        curl_close($ch);
        print_r(json_decode($r));
?>

there is nothing in $r, if I var_dump($r) it redirects me to the http://binance99.unaux.com/index.php,

I tried CURLOPT_HEADER => false, also I tried SSL version of my remote website, no luck.

I also tried file_get_contents() with same results.

Any help would be appreciated!