Forum Moderators: coopster

Message Too Old, No Replies

Data collection with PHP spider type script

Data collection with PHP spider type script

         

electronicsnation

7:38 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



I need to extract a segment of information from about 300 different html files. All the files are in the same format, just with slightly different content. I need to extract a few pieces of information from each of the files then record it into some kind of presentable way. I figure the easiest way to do this would be to save all the files to my website then run a simple PHP (or other) script to perform the functions.
Trouble is I do not know PHP.

Does anyone know how to code something like this?

Thanks.

Robber

9:58 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



Hi,

If you have all the files saved to your server, rather than trying to write a spider you could just open the directory in which your files reside and read them one at a time until you have cycled over the whole directory.

Each time you open a file you can do the extraction and other actions such as outputting somewhere else.

I'd suggest heading to php.net and searching the file/directory handling pages.