Find Jobs
Hire Freelancers

Code evaluation (pull file from browser cache)

$30-250 USD

Cancelled
Posted over 15 years ago

$30-250 USD

Paid on delivery
10 hour assignment. I am using a code to pull the cached files from the browser (primarily Internet Explorer). It's not working properly. I Want to see if anybody can get it working. The file is supposed to look at the temp folder for a specific file then use "output buffering" so that I may use the saved version of the file or use the cached file as a variable in my other php code here is the code: // check if the cache file already exists // and is less than 5 minutes old if (file_exists(’[login to view URL]’) && time() - filemtime(’[login to view URL]’) < 300) { // the output is already cached, so just // dump the file’s contents to the browser readfile(’[login to view URL]’); } else { // otherwise, the cache doesn’t exist yet // or is more than 5 minutes old, so it’s time // to re-generate the content // turn on output buffering so your code’s output // gets stored in the buffer instead of sent to the // browser ob_start(); // here you can place the existing PHP and HTML // you want to cache // now, write the output you captured in the buffer // into the cache file $fp = fopen(’[login to view URL]’, ‘w’); fwrite($fp, ob_get_contents()); fclose($fp); // and output the buffer’s contents to the // browser as well ob_end_flush();
Project ID: 322536

About the project

Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED STATES
Washington DC, United States
5.0
2
Member since Feb 2, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.