|
Posted by d on 09/26/90 11:37
"charliefortune" <google@charliefortune.com> wrote in message
news:1137498421.729248.212430@o13g2000cwo.googlegroups.com...
> In order to check availability, I want to visit many different pages
> from a database and try and match the regular expressions 'out of
> stock' or 'unavailable' or 'sold out' etc. If found, the product will
> be flagged as unavailable.
>
> I tried using fopen() and preg_match() but the problem is, if the reg.
> expression is present in javascript or in comments, the item gets
> wrongly flagged. Is there a way of taking what appears on the users
> screen, after parsing the page, and looking at it as a string I suppose
> ?
>
> I feel I might be missing a concept here, can anyone help ?
The answer is right in front of you ;) Remove the tags from the source
code, (first using regular expressions to remove script chunks, then using
strip_tags to clean out the rest), and you have your document ready to be
examined.
dave
Navigation:
[Reply to this message]
|