Expert Advise
ArticleCity.com - Free Articles for Reprint. Free Articles for ... Offers articles for reprint on sites in several different categories from computers
to home improvement. Free.
Archaeological Resource Service historic and cultural resources ... Cultural resource management assistance for developers, planners, and real estate
agents in the nine San Francisco Bay Area Counties.
Batteries-Online - Batteries, Remote Controls and Stylus Offers batteries, remote controls and styli. Profile and catalogue with shopping cart.
Alaska State Wide Real Estate Services Remote and investment land for sale in Alaska. Hundreds of listings with descriptions
and maps.
Albertine Kitchen & Bath Designers :: Bathroom and Kitchen ... Specializes in bathroom and kitchen renovations. Includes company profile, product
information, service descriptions, gallery of past projects, ...
Dating Relationship Love Sex Expert Advice Singles Men Women Advice on love, relationships, and sex.
Homestead Realty Home Page Serving Sherman County since 1984. Houses, land, commercial and auctions.
Fitness Equipment : Optima Fitness Supplies a range of fitness equipment including exercise bikes, treadmills and weights.
Philippine Jewelries - Components philippine jewelries shell ... Provides licensed software and marketing consultancy services.
CareerPerfect® - Interviewing Questions & Expert Advice Provides interview techniques and advice on how to answer challenging interview
questions.
Monk and Partners, Plymouth, Devon, England, UK, chartered ... A multi disciplined surveying practice based in the south west, we deal with all
areas of property management.
Tandara Grove Olive Oil Home Page Processes cold pressed olive oil for small to medium sized growers. Also buys
crop olives for olive oil sold under their own brand.
Information Technology Consultants. Our motto: "We do not sell ... Project management advisors headed by ex-military security expert following model
established by the Software Engineering Institute at Carnegie Mellon ...
Energy and Commodity Expert - Maycroft Consultancy Interactive energy training on electricity and derivatives trading and risk
management and support on power exchanges, electricity trading, risk management, ...
Elite Personal Training: Expert Advise on the Most Effective ... Personal expert advice from Pirouz Khonsari on the latest exercise programs,
weight training, weight loss programs including carb and protein diets, ...
Expert Betting Advice - Betting advice on horse racing and sports ... Tips on horse racing, greyhounds, soccer and golf.
Cass Lake Chamber of Commerce, Minnesota - Cass Lake travel ... Promoting tourism in the Cass Lake area. Events calendar, resorts guide, local
businesses, ideas on what to see and do in the area.
accent leasing For alternative automotive leasing services.
Ace Bats Specialises in handcrafted custom made bats, clothing, and equipment.
::.. Czajkowski & Rider, SC - Attorneys At Law Prairie du Chien general practice.
rss_url = $url;
$this->num_to_show = $numtoshow;
$this->do_update = $update;
$this->my_html = preg_replace("/(#{.*?):(.*?})/", "\\1__\\2", $html); //xx:xx tag workaround
$this->content = $this->fetch_feed();
$this->parse_feed();
$this->show();
}
/* string */
function fetch_feed()
{
$url_parts = parse_url($this->rss_url);
$filename = $url_parts['host'] . str_replace("/", ",", $url_parts['path']) . "_" . @$url_parts['query'];
if(file_exists($this->data_directory . "/$filename")) {
$last = filemtime($this->data_directory . "/$filename");
if(time() - $last > $this->update_interval * 60 || $this->update_interval == 0) {
$update = 1;
}
} else {
$create= 1;
}
if($create == 1 || ($this->do_update == TRUE && $update == 1)) {
$fp = @fsockopen($url_parts['host'], 80, $errno, $errstr, 5);
if (!$fp) {
echo "Couldn't open rss feed {$this->feed_url} in {$_SERVER['PHP_SELF']}
\n";
return;
}
fputs($fp, "GET " . $url_parts['path'] . "?" . @$url_parts['query'] . " HTTP/1.0\r\n"
."Host: " . $url_parts['host'] . "\r\n"
."User-Agent: Drew's RSS Reader 0.1\r\n"
."Connection: Close\r\n\r\n");
while(!feof($fp)) {
$rss_data .= @fgets($fp, 1024);
}
list(, $rss_data) = explode("\r\n\r\n", $rss_data, 2);
$output = @fopen($this->data_directory . "/$filename", "w+");
if(!$output) {
return $rss_data;
} else {
flock($output, LOCK_EX);
fputs($output, $rss_data);
flock($output, LOCK_UN);
fclose($output);
}
} //update
return file_get_contents($this->data_directory . "/$filename");
}
/* void */
function parse_feed()
{
preg_match("/
(.*?)<\/title>/", $this->content, $title);
$this->feed_title = @$title[1];
preg_match("/ (.*?)<\/link>/", $this->content, $link);
$this->feed_link = @$link[1];
preg_match("/(.*?)<\/description>/", $this->content, $description);
$this->feed_description = @$description[1];
preg_match_all("/- ]*>(.*?)<\/item>/s", $this->content, $items);
if (sizeof($items[0]) == 0) {
echo "No item elements found in rss feed.
\n";
}
for($i = 0; $i < sizeof($items[0]); ++$i) {
preg_match_all("/(?:<([\w:]*)[^>]*>(?:)?<\/\\1>)+?/si", preg_replace("/- ]*>/", "", $items[0][$i]), $elements);
for($j = 0; $j < sizeof($elements[0]); ++$j) {
$elements[1][$j] = str_replace(":", "__", $elements[1][$j]); //regex fix for items with : like dc:date
$this->rss[$i][$elements[1][$j]] = trim(html_entity_decode($elements[2][$j]));
}
}
}
/* void */
function show()
{
if($this->my_html == "") {
$this->show_html();
} else {
$this->show_user_html();
}
}
function show_html()
{
$show = (sizeof($this->rss) > $this->num_to_show ? $this->num_to_show : sizeof($this->rss));
for($i = 0; $i < $show; ++$i) {
echo "-
rss[$i]['link']}\" target=\"_new\">{$this->rss[$i]['title']} \n";
}
}
function show_user_html()
{
$show = (sizeof($this->rss) > $this->num_to_show ? $this->num_to_show : sizeof($this->rss));
for($i = 0; $i < $show; ++$i) {
extract($this->rss[$i]);
$item = preg_replace("/#\{([^}]+)}/e", "$\\1", $this->my_html);
echo $item;
}
}
} // end class
$url = "http://www.justinpfister.com/gnewsfeed.php?q=Expert&lang=en&ned=us";
$show = 3;
$html = "#{title} #{description} ";
$update = 1;
$rss = new rss_parser($url, $show, $html, $update);
$url = "http://search.news.yahoo.com/usns/ynsearch/categories/47/index.html?p=Expert";
$show = 3;
$html = "#{title} #{description} ";
$update = 1;
$rss = new rss_parser($url, $show, $html, $update);
?>