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);
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...
0
i need to throw this request on background to the process php. but its not working.