title: Is there a better way to hide JSON data when using amCharts for a web app?
body: <p>I'm playing with amCharts (within Wordpress) for a small project of mine. In order to use external data, amCharts requires a php script that exports data in JSON format which is called by JS within amCharts. However, that means you can see on the client side the exact php file I'm calling, which any user could copy and paste to get the raw JSON data. Is there a better way to limit the data availability?</p>
  
  <p>The code is very simplistic.</p>
  
  <p>Within the Wordpress amCharts plugin, I'm using the following to call a php file to retrieve JSON data: </p>
  
  <pre><code>// Set up data source
  chart.dataSource.url = "http://localhost/data/my_chart_data.php";
  </code></pre>
  
  <p>But any person can copy that line, plunk it in a web browser, then copy/paste the raw data.</p>
  
  <p>Would it be easier to  go to a server-side charting solution if data visibility is a concern? (At this point, the switch would be easy as my project is just starting.) If so, which solutions would you suggest?</p>