0

i need to process it background

i need to post the ID and process it background but its not wprking. whats the error? $id = $_GET['id']; $ch = curl_init('http://domain.com/process.php'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, "id=$id"); $hasil = curl_exec ($ch); curl_close ($ch);

28th Sep 2018, 7:59 AM
ZI Shahin
ZI Shahin - avatar
2 Respostas
+ 3
I'm not sure, for I don't use curl... But I would try putting the $id out of the quotation marks... "id="$id); at the end of line 5. Second, I would check if the $_GET['id'] returns anything at all... Something like: echo $id; inserted after the 1st line. and look for it in the resulting page...
29th Sep 2018, 1:11 PM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar
0
i need to throw this request on background to the process php. but its not working.
29th Sep 2018, 2:29 PM
ZI Shahin
ZI Shahin - avatar