Use PHP to find text within an HTML Page -


i write php code parse html return href , title of of images in "image_url" class. using substr find location of strings, webpage changes content , can't rely on substr. there dom way or other regular expression way can find these elements within html?

<a class="image_url" href="/123.jpg" target="_blank"><img src="/123.jpg" border="0" title="some dynamic length image title making difficult me"></a> 

you can use 3 things far know

  1. php simple xml parsing
  2. php domdoucment.
  3. simplehtmldom parser

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -