PDA

View Full Version : how grab all content of site in vb


mosz
03-31-2009, 03:09 PM
Hello
I want to write cache plugin
smth like that:

if (user not login) {
$cache_id = $_SERVER['REQUEST_URI'];
if (cache_exist($cache_id) {
echo get_cache($cache_id);
die();
}
else {
generate_cache($cache_id);
}
}


my problem is how to ganerate cache for request_uri ?
i want to have all content in one varible
smth like:
$cache = file_get_contents ($domain.$_SERVER['REQUEST_URI']);
but upper example make double site load.. so its not good

edit:
i want to grab content of:
index.php
forumdisplay.php
showthread.php
showpost.php


any idea ?

--------------- Added 1238581933 at 1238581933 ---------------

refresh

anybody know the answer ?
its very important for me :)

or maybe it can to show all varibles and arrays defined in php ?

mosz
04-03-2009, 11:27 AM
thx for help :P
if anybody want to know answer:

all site content can be grab in global_complate hook in $output varible

all varible in php we can show by:
$vars = get_defined_vars();
print_r($vars);