Welcome Guest, Not a member yet? Register   Sign In
POST to External server Using CI
#1

[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.
#2

[eluser]Dam1an[/eluser]
Could try cURL perhaps?
#3

[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.
#4

[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.
#5

[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.
#6

[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.




Theme © iAndrew 2016 - Forum software by © MyBB