Hmmm, not sure how to do this. What I’,m trying to accomplish is to choose 2 different css styles depending on how the user is getting to my page. My page is made like a basic page and a facebook app.
I want to be able to determine if the user is watching the page from facebook or not. Untill now I have tryid to do so by adding an variable to all my links (&app=‘.$app.’) and then doing this:
$app = urlencode($_GET['app']);
if ($app == 'fb'){
// GET THE FB CSS //
} else {
// GET THE REGULAR CSS //
}
But the problem here is that I have to many links in my page to alter them all… Can this still be done with $_SESSION and if yes… How?
Although not the most reliable thing in the world, $_SERVER[‘HTTP_REFERER’] should help. I say not the most reliable because the user can remove its contents if they browse in privacy mode.
Remember to filter the input of any $SERVER['HTTP*'] variable as the browser set their values making them subject to attack by an attack script (SQL injections, that sort of nonsense).