Hacker News new | ask | show | jobs
by hkolk 2049 days ago
Hmm.. not 100% sure but I see 2 bugs in the PHP script: 1. the src of the image in the HTML is the local path on the hosting server (it would become src="/var/www/nyt/nyt.jpg" ) 2. The v= parameter always uses current date, even if it downloaded yesterdays image. I assume it is being used to prevent caching, but thus doesnt really work. I'd use either an hash of the file or store the date used for the download in a variable and use that.