Forums

PHP

This topic is locked

nocache for PHP idiots

Posted 12 Apr 2002 18:10:24
1
has voted
12 Apr 2002 18:10:24 Julian Buckley posted:
Hi

I need to set up a system which uses Flash in an e-learning system, but the Flash-generated .txt file which translates the results from one page to another is always cached on the users hd, ignoring any later generated .txt files (if the user goes back and trys the quiz again, for example). Oh, script. the .txt is generated dynamically by a .cgi

Now, a user of Flash has said that PHP can stop this caching of the .txt document, but I'm not sure how to implement the file. I have the following:

<?php
header('Cache-control: no-cache');
$fp=fopen("LoadVar.txt", "r";
fpassthru($fp);
?>

Is it enough to invoke this file (uploaded to the cgi-bin) from my Flash movie to stop the caching, or is there another way to set it up?

As you can see, the title was appropriate. I can make Flash do anything, but I'm new to scripting, so any help would be greatly appreciated.
Cheers

Replies

Replied 13 Apr 2002 02:20:53
13 Apr 2002 02:20:53 Tim Green replied:
Use the built in No-Cache behavior built into PHAkT. You will find it in the Plus menu in the Server Behavior Floater.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic