JavaScript Editor Ajax software     Free javascripts 



Main Page

urlencode($this->_title),
urlencode($this->_site_name)),
$_site_info[‘url’]);
$html_feed .= ‘<a rel=”nofollow” href=”‘ . $url .
‘“ title=”‘ . $s . ‘“>’;
$html_feed .= ‘<img src=”/social_icons/‘ . $_site_info[‘icon’] .
‘“ alt=”‘ . $s . ‘“ class=”social_bookmarking” />’;
$html_feed .= ‘</a> ‘;
}
}
// return the HTML feed
return ‘<p>’ . $html_feed . ‘</p>’;
}
}
?>
4.
Modify
seophp/catalog.php
like this:
<?php
// load the URL factory library
require_once ‘include/url_factory.inc.php’;
// load social bookmarking helper class
require_once ‘include/social_bookmarking.inc.php’;
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<html>
...
...
...
<center>
<?php
// instantiate class by providing link, title, and site name
$social = new SocialBookmarking(‘http://seophp.example.com/catalog.html’,
‘Exciting SEOEgghead Products!’,
‘SEOEgghead’);
// display social bookmarking links
echo $social->getHTML();
?>
</center>
<center>
<a href=”popup.php” target=”_blank”>Find more about Professional Search
Engine Optimization with PHP!</a>
</center>
...
...
...
</html>
5.
Load
http://seophp.example.com/catalog.html
, and you should get the result you see in
Figure 7-7.
169
Chapter 7: Web Feeds and Social Bookmarking
c07.qxd:c07 10:42 169


JavaScript Editor Ajax software     Free javascripts