title: Safe JavasScript that calls PHP script that calls external web service
body: <p>I have a PHP page that needs to make a call to a external web service. This Web service call takes a bunch of sensitive data from a html form on the PHP page, e.g. SSN, and returns info related to that person.</p>
  
  <p>The problem is that the web service call should be made as soon as the customer fills in the SSN field and the field loses focus, so the page cannot be reloaded in any way. I was thinking about using jQuery to make a call to the web service, but AJAX unfortunately requires that you are on the same domain as the requested resource. So I'm thinking about creating an local PHP page that makes the call to the web service and then use JQuery to call this new page.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>How do I use JQuery to call the local PHP script that makes the call to the web service?</p></li>
  <li><p>Because the JQuery code will take sensitive data from a html form and send it to the PHP script, how can I encrypt the data?</p></li>
  </ol>