php - How to get same remote session with cURL and ajax curl request? -


i have php site curl's remote php app mod rewrite proxy uses session store app state. page's php codes loaded remote server mod proxy , curl (in center box, no htm , head tags goes trough curl)

i used method save curl remote session , works ok: https://stackoverflow.com/a/6989705/2278155 thank @scuzzy !

but app have couple simple ajax (not jquery, plain httprequest) not seem share same session php / curl! ajax call goes trough same mod proxy , curl. when made counter, clear ajax call , normal page refresh trough curl had different sessions.

how can make them same ? can add url parameter sid= ?

i'm facing same problem you. i'm developing application accessible either via webbrowser (webserver1) or html5_app ipad , android. because core of application (apiserver2) have 2 different sid's.

my login works following:

-> ajax request api server login. if success, store users sid in database on apiserver. -> apiserver returns sid client, 1 makes refresh on page , transmitts sid weburl of webserver1 -> webserver1 checks if sid valid , found in database. if so, select , store user.

now can handle operations i've got 2 different sids.

hope helps!

greetings


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -