August 15th, 2000, 06:40 AM
I need to write a PHP program which can perform the following tasks:
1. read a HTML file from a given url, and generated another HTML using the content from the original HTML file.
I just wonder is fopen() is the only function can use in here?
August 15th, 2000, 03:02 PM
you can use file() to grab local files if you can get your host to cache them for you , but at the end of the day the fun stuff is still going to be grabbing the content you want out of the file however you cache it. fopen()/fgets() etc are pretty good tools.
A basic example http://www.firepages.com.au/news.htm
August 15th, 2000, 06:40 PM
You can use file() to get the contents of remote files. I used this when i made my guestbook. So what you could so it use file to grab the contents of a file.
then use it to do whatever you need in the rest of the script.
[This message has been edited by Aoeex (edited August 15, 2000).]