I'm trying to code a cron job that goes to a php page but the page
checks if the session is auhtorized like this:
if ($_SESSION['auth'] != "yes")
{
header("Location: index.php");
exit();
}
the other file looks like this at the moment
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"page_link");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);
which obviously doesn't work. I tried to add:
curl_setopt($ch, CURLOPT_COOKIE, "auth=yes");
but that didn't help.
How can I set my session variable so that it's passed in the curl?
I'm glad for any help, pointers.
thanks