Cron is use to schedule the jobs
Yes, that's why i suggested:
you can get rid of the files afterwards any of several different ways including cron jobs
Sending something to a visitor's browser is as simple as directing them to the file saved on the server. Because you said you are already creating the file on the server...
currently i am exporting a csvfile of my search result, but its store in the server itself
i suggested:
then redirect to that file
what that means, is if we modify your example, to include a functions.php at the very top, which contains THIS function
- Code: Select all
function redirect_to( $location = NULL ) {
if ($location != NULL) {
header("Location: {$location}");
exit;
}
}
then add this line right after "fclose($fp)"
- Code: Select all
redirect_to($fp);
your server will then send their browser to the pdf file that it has just created. as long as they have a pdf reader plugin, the file will be displayed in their browser and they will have the ability to go up to the file menu and save it.
This is all the
exact same advice, hopefully explained out enough this time.