JavaScript Editor Ajax software     Free javascripts 



Main Page

The former is an example of a cute tool. PageRank, more recently, is widely regarded as less important
than it used to be. However, in a time when the green bar in the toolbar meant everything to search
engine marketers, the idea of predicting PageRank was extremely appealing, and, despite the fact that the
tool itself stated it was fictitious, many people used and linked to it. According to Yahoo!, as of June 2006,
the page has more than 3,000 links (Yahoo! reports backlinks the most accurately of all search engines; see:
http://www.seroundtable.com/archives/002473.html
).
Other traditional examples of interactive link bait include calorie counters, mortgage calculators, and
currency converters.
Case Study: Fortune Cookies
Because the sample e-commerce catalog will sell cookies, this example will be a cute graphical fortune
cookie tool that tells a site visitor his or her fortune. This tool may be included by other web sites, so
that they too can provide their visitors with fortunes. It can include a logo for branding, and it contains
a link to your store in order to hook your links and encourage more users to use the tool. The fortunes
are stored in a list and returned randomly. A few sample fortunes are in the sample database script.
The fortune cookie image looks like Figure 10-1.
Figure 10-1
A page is placed on your site to showcase the tool, and you link to that page from your site menu with
the anchor text “free fortune cookies.” This affects some click-throughs. You show users how to add the
fortune cookie to their sites on the page, and the HTML to do so, in turn, is linked to your free fortune
cookie page. You also may place a link to another part of your site below that says, “Get your free cook-
ies at Cookie Ogre’s Warehouse.” The following is a quick exercise that demonstrates the technique.
Building the Fortune Cookie
1.
In this exercise you’ll make use of the GD function
imagecreatefromgif
. This function is
supported in GD versions prior to version 1.6, or more recent than 2.0.28, as explained in the
documentation at
http://www.php.net/imagecreatefromgif
. You’ve already learned how
to enable the GD2 module in Chapter 6 — but if you haven’t here’s a quick refresher. To enable
GD2, you need to edit the
php.ini
configuration file, and uncomment the following line by
removing the leading semicolon. Afterwards, you need to restart the Apache server.
extension=php_gd2.dll
2.
Create a folder named
images
under your
seophp
folder, and copy the
fortune_cookie.gif
file from the book’s code download to the
images
folder.
3.
You need a font that will be used to write the text to the fortune cookie. For legal reasons, we
can’t provide you with a font, but you should have plenty to choose from on your machine.
214
Chapter 10: Link Bait
c10.qxd:c10 10:43 214


JavaScript Editor Ajax software     Free javascripts