Ajax software
Free javascripts
↑
Main Page
Figure 11-4
12.
Now, to make effective use of your cloaking library, create a new file in your
seophp
folder,
named
cloaking_test.php
, and type this code in it:
<?php
// load the SimpleCloak library
require_once ‘include/simple_cloak.inc.php’;
// Use cloaking to render text instead of images
if (SimpleCloak::isSpider() >= 3)
{
echo ‘Tweety and Sylvester’;
}
else
{
echo ‘<img src=”http://seophp.example.com/Images/tweety.jpg” />’;
}
?>
13.
Create a folder named
images
in your
seophp
folder, and copy the
tweety.jpg
image from
the code download of the book to this folder.
231
Chapter 11: Cloaking, Geo-Targeting, and IP Delivery
c11.qxd:c11 11:01 231
Ajax software
Free javascripts
→