title: Ajax jquery request to another domain
body: <p>So I have a php file called paste.php in a directory in a server with domain example.com (<a href="http://www.example.com/ajax/paste.php" rel="nofollow">http://www.example.com/ajax/paste.php</a>)
  The php file looks like:</p>
  
  <pre><code>&lt;?php
  $id=($_GET['create']);
  $paste=($_GET['paste']);
  $toly=($_GET['toly']);
  if($id=='create'){
  echo "hello";}
  else{
  echo "world";
  } ?&gt;
  </code></pre>
  
  <p>In another server with different domain i have a simple html file (www.example/demo/index.html)
  I 'am trying to make an ajax call to the php file above with no luck
  My jquery looks like:</p>
  
  <pre><code>var url="http://www.example.com/ajax/paste.php";
  s="create=create&amp;paste=hello&amp;toly=this";
  $.ajax({
     type: "GET",
      xhrFields: {
        withCredentials: true
     },
     url: url,
     data: s,
     success: function(msg){
     alert(msg);
     },error:function (jqXHR){
                      alert(jqXHR.status.error);
                  }  
   }); 
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT</strong> : Forget the xhr i just want to get back the string i have made as a response
  Is there any way?</p>