I have created a script that I am adding some features too.
One of these features will be to allow the script to return back META tag information from a directory of locally stored hypertext documents. Specifically, this data will (for me) be formatted as such:
....
<head>
<meta http-equiv="author" content="Sean Shrum">
<meta http-equiv="email" content="sean@shrum.net">
<meta http-equiv="created" content="020101">
<meta http-equiv="modified" content="030407">
....
</head>
I figure I can use the '</head>' as a trigger to end looping so I don't parse the entire HTML files.
I've got the code to read in the data line by line but I am having issues about how to parse the meta lines for the data. Issues like:
How do I search for substrings with double quotes in them?
What if the user switches the order of the keys?
etc.
BTW: I would rather code the process myself as opposed to using some sort of lib that would do this for me...seems like it should be a fairly easy thing to accomplish, knowing the particulars of PHP.
Any help would be apprechiated.
TIA