############################################### test.php ############################################## '; $marker_end = '
'; $url = 'http://www.solid-state.org:8080/solidstate/milestone/v0.4'; $cache_dir = '/home/8631398594/www/web/new/pnTemp/Xanthia_cache/'; $vpage_name = 'roadmap'; $cachetime = '86400'; //3600 seconds equals an hour $page = $cache_dir.$vpage_name; ################### #look here ################### //if file exists do this if (file_exists($page)) { $cachedtime = filemtime($page) + $cachetime; //if page is to old, do this if ( $cachedtime > time()) { $src_content = get_url ($cache_dir.$vpage_name); } //if file doesnt exist, pull it }else{ $src_content = parse_retrieved_content ( $url, $marker_start, $marker_end, '', $cache_dir, $vpage_name ); } ################### #stop looking =P ################### $src_content = trim ( $src_content ); # Eliminates trailing white space from the HTML source. $src_content = str_replace("/solidstate/query", "http://www.solid-state.org:8080/solidstate/query", $src_content); $src_content = str_replace('tickets active">', 'tickets active">', $src_content); print "$src_content"; # Renders the HTML to the browser ?> ############################################################ includes/fetch_functions.php ############################################################ "; $contents = str_replace($marker_start, $separator, $contents); $contents = str_replace($marker_end, $separator, $contents); $output = explode ( $separator, $contents ); cache_content ($cache_dir, $vpage_name, $output[1] ); return $output; } # End of parse_retrieved_content(). ?>