title: PHP 'file_get_contents' does not work from server
body: <p>I have a <code>website</code> (PHP) hosted in Yahoo small business and <code>application</code> (Java) Hosted in Rackspace. </p>
  
  <p>I am making a <code>file_get_contents</code> from website to application. which works fine in my local. but when i try the same after deploying it in server does not work.</p>
  
  <p>Here i am making arequest which sends list of training in <code>JSON</code> format.</p>
  
  <p><strong>PHP part</strong> </p>
  
  <pre><code>  $trainingArrayJson = file_get_contents('http://mywebapplication.com/publicTraining/getTrainingsAsJson/');
   $trainingArray =  json_decode($trainingArrayJson);
        -------
        -----
  </code></pre>
  
  <p>this is not working.</p>
  
  <p>if i do </p>
  
  <pre><code>   $trainingArrayJson = file_get_contents('http://localhost:8080/publicTraining/getTrainingsAsJson/');
   $trainingArray =  json_decode($trainingArrayJson);
  </code></pre>
  
  <p>this works fine.</p>