Post Query Result From A Local Application To An External One

Hi all!

I’m facing a little problem, i want to create a local version of my application that can be used also when no internet connections are available.

To do this i need to update all the data stored during the offline session when internet is available again.

Since i cannot access directly the database from local i decided to post all the data to an action and then perform the insertion.

I’ve already tried with “redirect” and “forward” methods but they didn’t work, how can i do?

This is the "local" action


	public function actionSynch()

	{

		//....

                //query for all the local records

		//.....


		CController::forward('http://www.test.com/index.php?r=site/synch',array('result'=>$result));

	}

Hi,

I think , This extension may help you!

ChttpClient

My be the ajax call could be a solution for this

Cheers!

Thanks! I guess that yii (no extensions) doesn’t support this feature, am i right?

Are you using HTML5 client side storage?

Nope, what i want to do is create a twin(offline) application that by mean of a button can synchronize with the on line application.

I’m reading your article and it’s interesting, but i’m not confident with HTML5 and if there is another solution it will make me happy :rolleyes:

Furthermore due to some limitations i cannot connect to remote database from local so i think that this kind of solution will not work

What about curl?