title: angularjs can't communicate with php using POST
body: <p>I am trying to send and then get data from PHP on my server, but I don't think it sends the data.</p>
  
  <p>My js code:</p>
  
  <pre><code>angular
      .module('h2hApp', [])
      .controller('mainCtrl', ['$scope', '$http', function(scope, http) {
  
          scope.initGames = function() {
              http({
                  method: 'POST',
                  url: 'apis.php',
                  data: {
                      url: someUrl
                  }
              })
                  .success(function(data) {
                      console.log(data);
                  });
          };
  
          scope.initGames();
      }]);
  </code></pre>
  
  <p>and my PHP file:</p>
  
  <pre><code>&lt;?php
      $url = $_POST['url'];
      echo file_get_contents($url);
  ?&gt;
  </code></pre>
  
  <p>The only thing I get in response is that error: </p>
  
  <pre><code>Notice: Undefined index: url in /my/path/apis.php on line 2
  </code></pre>
  
  <p>I made this working using jQuery but with AngularJS it doesn't seem to work. I'm new to Angular and I read some other problems like this. I tried things like adding headers and other things but nothing worked.</p>