SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
Thread: regexp
-
May 5, 2005, 05:04 #1
- Join Date
- Nov 2004
- Location
- Southampton, UK
- Posts
- 537
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
regexp
i want to get all the results from a google page
so far i have
PHP Code:
$url = "http://www.google.co.uk/search?q=plate&meta=cr%3DcountryUK%7CcountryGB";
$html = @implode(file($url));
preg_match_all("/Home (.*\s)Garden/", $html, $matches);
for ($i=0; $i< count($matches[0]); $i++) {
echo "matched: " . $matches[0][$i] . "<br>";
echo "part 1: " . $matches[1][$i] . "<br>";
echo "part 2: " . $matches[3][$i] . "<br>";
echo "part 3: " . $matches[4][$i] . "<br><br>";
}
Bookmarks