Can’t access 3rd party API, code works on local server but not on wordpress

Can you drop this in and let us know what $content looks like?

<?php
  $c = curl_init();
  curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($c, CURLOPT_URL, "A WORKING API");
  $content = curl_exec($c);
  curl_close($c);

  echo '<pre>';
  print_r($content);
  echo '</pre>';

I am curious if this is a WordPress issue or just a CORS issue with the call being made from a different host.