title: Sending $.getJSON to external server
body: <p>I was told that $.getJSON is the best way to send data to and from external servers. I probably wasted  7 hours of my time trying to use JQUERY's Ajax to do so just to find out that no browsers allow that type of method. I would like to send the data using the Jquery getJSON and I am using cakephp as my receiving end (i.e. My external server) Here is what i have so far.</p>
  
  <pre><code>$.getJSON("http://play.mysite.com/usersessions/store/",{ data: "Hi!"});
  </code></pre>
  
  <p>I don't want a callback because I dont need it. I just need to send some data to the external server. This is MVC site so usersessions is my controller, store is my action.</p>
  
  <p>Below is my cakephp code. If you don't know it then that is fine. I just really need to know if I am sending the getJSON data correctly</p>
  
  <pre><code>&lt;?php class UsersessionsController extends AppController {
  
  var $name = 'Usersessions';
  var $helpers = array('Html', 'Form','Ajax');
  var $components = array('RequestHandler');
  
  
  function store()
  {
     Configure::write('debug', 0);
     $this-&gt;autoRender = false;
  
     if($this-&gt;RequestHandler-&gt;isAjax()) {
         if ($this-&gt;params['url']['data'])
         {
             $this-&gt;data['Usersession']['data'] = $this-&gt;params['url']['data'];
              $this-&gt;Usersession-&gt;Save($this-&gt;data);
              echo 'Success';
          }   
     }    
  }
  </code></pre>
  
  <p>}
  ?></p>
  
  <p>Thanks you!</p>