Topic awaiting preservation: Stop directly oopening PHP... |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-23-2005 09:10
I want to place all of my CSS into on PHP file and simply call each style by css.php?style=whatever... |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-23-2005 09:38 |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 06-23-2005 13:27
not easily. I mean, you can always do a referercheck - but that doesn't stop any one who's determined even the least bit (either forge referer, or just browse your own cache...) |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-23-2005 19:04
What about something like this in the head of the file to be included: code: if (!function_exists('prevent_direct_loading')) { die('Sorry, but this file can not be loaded directly.'); }
|
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-23-2005 19:58
If you are trying to hide you CSS from the user you can not do it. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 06-23-2005 20:22
I think you overlooked that your css and php files are being included by the browser - they're being done via seperate request, and therefore won't have anything defined you do in your main php file (be it a function, a variable, or a constant). |
Maniac (V) Inmate From: under the bed |
posted 06-23-2005 20:52
the question needs to be asked - why would you want to hide your css? |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-23-2005 23:26 |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 06-24-2005 00:46 |
Maniac (V) Inmate From: under the bed |
posted 06-24-2005 02:27
hiding/not hiding the site's CSS has nothing whatsoever to do with the security of the site |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-24-2005 06:23 |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 06-24-2005 17:16
That is still not possible, you can not prevent your site from being ripped. Once you sever something to the user they have it. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-24-2005 18:07
Even if you couldn't get the files anyone with some small talent could easily recreate any website with relative ease. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 06-24-2005 22:55
here's a (mild) idea that will stop your site from easily being ripped: |