Can someone share some code that will grab from a webpage all a href's and img's on the page? Also how to grab a certain text string out of a webpage.
Thanks
Thanks
/<a.*href=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><img.*src=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><\/a>/im
preg_match_all("/<a.*href=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><img.*src=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><\/a>/im", $string, $matches)
/<a.*href=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><img.*src=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><\/a>/im
preg_match_all("/<a.*href=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><img.*src=[\"|\']([^\"|^\'|^\s]+)[\"|\'].*><\/a>/im", $string, $matches)

Comment