Fortnite Tracker API Only Runs On Local Machine? : <p>I'm currently creating a bootstrap website using my Fortnite stats as data and eventually posting it on my twitch feed. However, I've managed to get it to work perfectly when I run on my local machine but when I uploaded it to my hostgator directory the site loads fine it just has no data. The error I'm getting I believe refers to my JSON file but I'm assuming the only reason this error is occurring is because there is no data in there as it's not working with the Fortnite API when ran on anything other than my local machine. Has anyone else ever experienced anything like this before?</p>

<p>The Error:</p>

<blockquote>
  <p>Source map error: SyntaxError: JSON.parse: unexpected character at
  line 2 column 1 of the JSON data</p>
  
  <p>Source Map URL: bootstrap.min.css.map</p>
</blockquote>

<p>This is my code I assume there's not much point in posting it as if it runs on my local machine logic says it's fine, right?</p>

<pre><code>&lt;?php

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.fortnitetracker.com/v1/profile/psn/myusername");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'TRN-Api-Key: mykey'
));
$response = curl_exec($ch);
curl_close($ch);
$fp = fopen("stats.json", "w");
fwrite($fp, $response);
fclose($fp);

$data = json_decode(file_get_contents("stats.json"));
$solo = $data-&gt;stats-&gt;p2;//solos data
$duos = $data-&gt;stats-&gt;p10;//duos data
$squads = $data-&gt;stats-&gt;p9;//squads data
$solo_wins = $solo-&gt;top1-&gt;valueInt;
$duos_wins = $duos-&gt;top1-&gt;valueInt;
$squads_wins = $squads-&gt;top1-&gt;valueInt;
$solo_matches = $solo-&gt;matches-&gt;valueInt;
$duos_matches = $duos-&gt;matches-&gt;valueInt;
$squads_matches = $squads-&gt;matches-&gt;valueInt;
$solo_kd = $solo-&gt;kd-&gt;valueDec;
$duos_kd = $duos-&gt;kd-&gt;valueDec;
$squads_kd = $squads-&gt;kd-&gt;valueDec;
$solo_games = $solo-&gt;matches-&gt;valueInt;
$duos_games = $duos-&gt;matches-&gt;valueInt;
$squads_games = $squads-&gt;matches-&gt;valueInt;
$solo_kills = $solo-&gt;kills-&gt;valueInt;
$duos_kills = $duos-&gt;kills-&gt;valueInt;
$squads_kills = $squads-&gt;kills-&gt;valueInt;

?&gt;
</code></pre>
