Hi.
I have a requirement to extract certain text from a remote Web Page.
I want to extract Meta Keywords, Meta Description, text between H2 tags, and some general Body text.
I have tried XML HTTP Request object, but I cannot get the example (from jibbering.com) to work.
Would this be difficult, or does someone know an easy (?) way to do this?
Extracting text from a remote web page
Moderator: General Moderators
I get the latest incentives directly from chevrolet with this code.
[syntax=php]<?php
$site = "http://www.chevrolet.com/cur_offers/pri ... h_east.htm";
$open = fopen($site, "r");
$search = fread($open, 50000);
fclose($open);
$search = ereg("SOUTH EAST(.*)", $search, $content);
$content[1] = str_replace(" ", " ", $content[1]);
$content[1] = str_replace("href=", "", $content[1]);
echo $content[1];
?>[/syntax]
[syntax=php]<?php
$site = "http://www.chevrolet.com/cur_offers/pri ... h_east.htm";
$open = fopen($site, "r");
$search = fread($open, 50000);
fclose($open);
$search = ereg("SOUTH EAST(.*)", $search, $content);
$content[1] = str_replace(" ", " ", $content[1]);
$content[1] = str_replace("href=", "", $content[1]);
echo $content[1];
?>[/syntax]