title: Passing data between two seperate Yii web applications
body: <p>I have a yii application <strong>(APP1)</strong>, and a separate yii application <strong>(APP2)</strong> that I would like to download multiple rows/tables from <strong>APP1</strong> to <strong>APP2</strong>, complete some actions and then send them back to <strong>APP1</strong> (whilst completing the tasks <strong>APP2</strong> may be offline).</p>
  
  <p>Currently I have a request (using <code>GET</code>) that gives me all the data I need in a <code>json</code> object from <strong>APP1</strong>.</p>
  
  <p>I am not too sure how best to proceed from here? Does anyone have any ideas on how to approach this?</p>
  
  <pre><code>  public function actionDownload($id) {
      // Check if id was submitted via GET
      if(!isset($_GET['id']))
          $this-&gt;_sendResponse(500, 'Error: Parameter &lt;b&gt;id&lt;/b&gt; is missing' );
          $model = AuditLines::model()-&gt;findAll(array("condition"=&gt;'line_audit_id='.$_GET['id']));
  
      if(is_null($model))
          $this-&gt;_sendResponse(404, 'No Items found with id '.$_GET['id']);
      else
          $this-&gt;_sendResponse(200, CJSON::encode($model));
      }
  </code></pre>
  
  <p>That gets me all the data I need, now I need to place that data into temporary tables in APP2's database, then I can modify send back once complete</p>
  
  <p>** Update **
  Another issue here will be that APP1 will be on a live server, and APP2 will be hosted on a WAMP server. APP2 will need to get the data (tables/rows) from APP1 and then go offline whilst the work is completed. Once the job is finished(and APP2 has an internet connection) it will need to pass the data back to APP1 to be processed
  Thanks for all your help </p>