I am quite new in YII just 2 weeks and I am getting a hang on it, but I have an integration I have to do, which includes submitting form data to an enternal site, as well saving said data in my DB, after which i am automatically redirected to the said site and after performing some actions they send some data back, which should be displayed and saved in my DB as well. Any help would be grossly appreciated. Thanks
Asked
Active
Viewed 489 times
0
-
1What exactly is your question? – topher Feb 16 '13 at 11:48
-
The question is how to post data from a form to an external site(url), and save to my db as well – Precious George Feb 16 '13 at 11:58
1 Answers
0
You will need cURL for the remote request: http://www.php.net/manual/en/curl.examples-basic.php. Yii does not have this functionality by default, but you can create a component for it, which makes a post request to the remote site using cURL.
Depending on the format of the returned data, you will need to decode/unserialise it. You can create a CDbCommand to store it directly into the database or assign values to an Active Record model and store that into the database.

JonathanStevens
- 472
- 3
- 9