Hello everyone,
I am troubling my mind with the following problem.
I have a page containing an image gallery with the possability for the visitor to download the image in higher resolution. The page posts to a download script, and the download itself sems to be working fine.
After the image-file is downloaded to my visitor I need to refresh the gallery page. Any idea on how this can be done? I have experimented with meta refresh on the gallery page but it doesn't give the right impression on the page as it doesn't need to be reloaded all the time (it just need to be reloaded after a file download)
I have also tried to figure out how to do it from the download script, but can't get it to work.
This is the download script:
header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header ("Content-Type: application/octet-stream");
header ("Content-Length: " . filesize($serverpath.$file));
header ("Content-Disposition: attachment; filename=$file");
if(readfile($serverpath.$file))
{
if(connection_status() == 0)
{
//I do some stats and "accountancy" downloads here
}
Does anyone have an idea? Any help will be preciated.
Tore