I have just moved my site to a unix platform. Previously, I had an asp page where I was able to read a file, and based on the contents redirect to another page. The asp page had no html content, it just did the redirect. If the contents of the file was 1 it redirected to one.htm, 2 to two.htm and so on. Once I read the file I incremented and rewrote the file.

I think I should be able to do the same thing in PHP, but I don't know how to open a file, read a file, write a file or code the redirect. Does any one have a basic script that does this? Or perhaps send me to a site that where I can find one.

I just used PHP for the first time today!

Thanks!