- Joined
- Dec 10, 2007
- Messages
- 2,178
- Reaction score
- 264
Hello,
This is what happens when you try to access vBulletin's CSS (even through view source mode):
http://www.vbulletin.com/forum/css....ulletin-chrome.css,vbulletin-formcontrols.css,
I was wondering how vBulletin 4 manages to hide the CSS source from being viewed directly. At first I thought a simple session trick would work, but it appears that the browser or something is caching the file in view source mode, as I can view it the first time, but after a refresh it hides the CSS like it is suppose to do. But if I directly access the CSS file the first time it does what I wanted it to do - it hides the CSS.
index.php
style.php
Any input on how to accomplish this would be much appreciated.
This is what happens when you try to access vBulletin's CSS (even through view source mode):
http://www.vbulletin.com/forum/css....ulletin-chrome.css,vbulletin-formcontrols.css,
I was wondering how vBulletin 4 manages to hide the CSS source from being viewed directly. At first I thought a simple session trick would work, but it appears that the browser or something is caching the file in view source mode, as I can view it the first time, but after a refresh it hides the CSS like it is suppose to do. But if I directly access the CSS file the first time it does what I wanted it to do - it hides the CSS.
index.php
PHP:
<?php
//secure CSS
session_start();
$_SESSION['CSS'] = 'unsecure';
?>
<link rel="stylesheet" type="text/css" href="style.php" />
style.php
PHP:
<?php
session_start();
if($_SESSION['CSS'] != 'unsecure') {
die('What are you trying to do?');
}
unset($_SESSION['CSS']);
header("Content-type: text/css");
?>
body {
background-color: #EBEBEB;
}
Any input on how to accomplish this would be much appreciated.

