I was brought on a project to finish working on a CMS… The page system uses this
if(isset($_GET['page']))
{
$page = page($_GET['page']);
$location = "./styles/{$get['path']}/pages/{$page}.php";
if(file_exists($location) && $page != "index")
{
if($page == "donate" || "wpnmake" || "wpnconfirm" || "wpnbuy")
{
$location = 'domain.com'.$location;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$location);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HEADER, false);
//step3
$result=curl_exec($ch);
//step4
curl_close($ch);
return $result;
}
else
{
$file = logged(file_get_contents($location));
}
return $file;
}
else
{
$location = "./styles/{$get['path']}/pages/not_found.php";
$file = bbcode(logged(file_get_contents($location)));
return $file;
}
whenever i try and call the cookie $_COOKIE[‘login’] which is 100% set, I can access it when i use a file in the root directory. However when I go to a page like domain.com/?page=custompage
I have no access to sessions or cookies, is there anyway to get around that?
Long story short. User logs in gets assigned a cookie, I want to be able to pull that cookie from domain.com/?page=custompage, however it always tells me it is a invalid index.