![]() Topic awaiting preservation: Stop directly oopening PHP... (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Kansas City, MO , USA |
![]() 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 |
![]() |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() 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 |
![]() 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 |
![]() If you are trying to hide you CSS from the user you can not do it. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() 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 |
![]() the question needs to be asked - why would you want to hide your css? |
Bipolar (III) Inmate From: Kansas City, MO , USA |
![]() |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() |
Maniac (V) Inmate From: under the bed |
![]() 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 |
![]() |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() 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 |
![]() 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 |
![]() here's a (mild) idea that will stop your site from easily being ripped: |