Where are they stored? How are they retrieved? Imho it seems less obtrusive if you plugin that verification stuff at retrieval time... (Thinking about hashes of the encrypted or unencrypted content here).pooh14 wrote:hi,
my aim of the project is to verify the integrity of a webpage and if any aunthorized changes has been made to it, it would restore to the original content. besides all pages are encrypted and stored. thus for each request it needs to be decrypted.
Execute PHP script automatically for each page request
Moderator: General Moderators
-
rubberjohn
- Forum Contributor
- Posts: 193
- Joined: Fri Feb 25, 2005 4:03 am
hi guys,
but prepending the file and using $_SERVER in my script, i manage to solve the problem partially.
however, if i m going to call a particular page using include('pooh.php') instead of the normal hyperlink method, the $_SERVER does not hold the requested page, instead the page which contains the include statement.
how do i solve the problem?
thanks alot
but prepending the file and using $_SERVER in my script, i manage to solve the problem partially.
however, if i m going to call a particular page using include('pooh.php') instead of the normal hyperlink method, the $_SERVER does not hold the requested page, instead the page which contains the include statement.
how do i solve the problem?
thanks alot
Hi Feyd,
Thanks.
echo basename(__FILE__,".php") just prints the filename of the current file, not the module i called for.
assuming i have 3 scripts, page1, page2, page3
so in page1, i have include(page3)
assuming i have auto_prepand page2
in page2, i print out basename(__FILE__), i get page2.
what i would like it to find out is the requested page by page1, which is page3.
Thanks.
echo basename(__FILE__,".php") just prints the filename of the current file, not the module i called for.
assuming i have 3 scripts, page1, page2, page3
so in page1, i have include(page3)
assuming i have auto_prepand page2
in page2, i print out basename(__FILE__), i get page2.
what i would like it to find out is the requested page by page1, which is page3.
In this case the code in page2 is executed before the code in page1... Thus at that moment you don't have a crystal ball and can't know what's going to happen in page1pooh14 wrote: so in page1, i have include(page3)
assuming i have auto_prepand page2
Well, the easiest work-around to me seems that you define a function on page1 that returns the page you'll include...
Code: Select all
function getPage() {
// do whatever
return 'page3';
}
Hi,
Thank timvw. but i think you dont really understand my problem.
as i said earlier, my AuthenticationModue(auto-prepended file) is an extra module i did to check integrity of the pages...
this is my univeristy project.
however my main aim is when i merge this AuthenticationModule with existing web pages, I would not much changes done to the existing website (good design purpose). thus i would just like one main configuration change.
so all i need to know is the requested filename in my authenticationmodule, at the momend i dun have problem with normal href links....however i have problem when the file is requested using include statements.
thank you
Thank timvw. but i think you dont really understand my problem.
as i said earlier, my AuthenticationModue(auto-prepended file) is an extra module i did to check integrity of the pages...
this is my univeristy project.
however my main aim is when i merge this AuthenticationModule with existing web pages, I would not much changes done to the existing website (good design purpose). thus i would just like one main configuration change.
so all i need to know is the requested filename in my authenticationmodule, at the momend i dun have problem with normal href links....however i have problem when the file is requested using include statements.
thank you
Nevermind, what I am talking about only works for directory listings.
HeaderName names the file which, if it exists in the directory, is prepended to the start of server generated directory listings. Like ReadmeName, the server tries to include it as an HTML document if possible or in plain text if not
I find that you're doing very little research yourself for a university project. (http://www.php.net/include)