![]() |
POST to External server Using CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: POST to External server Using CI (/showthread.php?tid=19021) |
POST to External server Using CI - El Forum - 05-25-2009 [eluser]Mellkior[/eluser] Hi, i need make a post from CI to other server CI. I try with Jquery and Ajax but return error: Access to restricted URI denied" code: "1012 i will send 2 datas for post from server to other server. Anyone have a solution using ci, php or javascript? Thanks and sorry for my english. POST to External server Using CI - El Forum - 05-25-2009 [eluser]Dam1an[/eluser] Could try cURL perhaps? POST to External server Using CI - El Forum - 05-25-2009 [eluser]Mellkior[/eluser] yes, worked 99%, but i use session in browser and cURL not save session in browser, only simulate. Have a chance save the simulate session on browser? Thanks. POST to External server Using CI - El Forum - 05-25-2009 [eluser]Phil Sturgeon[/eluser] Can you not simply replicate the session data? Send the request through cURL then manipulate the session data for the local server? Not sure what you are up to with the session data so cannot be more specific. Also, take a look at the cURL library in my signature. POST to External server Using CI - El Forum - 05-25-2009 [eluser]Phil Sturgeon[/eluser] Forgot to mention you cannot use AJAX cross-domain. You will need to make an AJAX request to a PHP script on the local server, then get that script to make the request and again cURL will probably be your best bet. POST to External server Using CI - El Forum - 05-26-2009 [eluser]Mellkior[/eluser] Solution was use cURL for verify login and password, if both true, post form to url and make login. Thank you for help. |