You are here: Re: match regular expressions in a webpage, not the entire source « PHP Programming Language « IT news, forums, messages
Re: match regular expressions in a webpage, not the entire source

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация