Your problem is that you're trying to do a cross domain request. The browser prevents it due to same origin policy.
The standard solution is to set CORS headers in your PHP to allow those requests.
For example :
<?php
header("Access-Control-Allow-Origin: *");
?>