i am new to php/mysql but i have read many books and online articles, I know what i am about to ask is possible, i just don't know the best way to go about doing it. thanks in advance for any help-
the goal:
have php open files on my drive (saved html files), look for keywords and populate my own db with the content it finds.
an example:
say these html files contain bio info of sports players. i need to get the players firstName, lastName, sportPlayed, position, birthDate, birthPlace, currentTeam, yearsigned. This info is in each of these html files. All the html files have the same format, so i know after the text Birthdate: is that players birth date and i want that date to be put in my db (along with all the other info)
my db has a profiles table. so the content needs to go in there. I need this script to go through each html file and look for these certain keywords and enter the information that follows into my database, no more no less. in addition, sometimes the info does not follow a keyword. For instance there will always be a keyword of Birthplace that follows with the city,state of that persons birthplace, but for sport played there is no text in the html files that says Sport Played: -instead it just says Tennis or Hockey.
i hope i worded my question appropriately and look forward to any advise. I am assuming i will have to use the file() function and then use conditions to go through the returned array.
thanks
c