$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://localhost/");
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, "command=login&username=user&password=pass");
$result = curl_exec ($ch);
curl_close ($ch);
echo "Result: ".$result;
This code works fine that it logs me in to the login page, what when I click on a link in the result page, I get a session expired error. I even tried it by commenting out the curl_close function, but still no luck. Is there any way I can keep my http session using these curl functions and be able to redirect to another page from the result page.
Thanks in advance!