Show Ads To Search Engine Visitors Only (Wordpress)

CLOSED
Bids
6
Avg Bid (USD)
$50
Project Budget (USD)
$30 - $250

Project Description:
I'm trying to make this code work on my block without success...

What is does...it knows if the Visitors came from a search engine.. #1 and shows the ADS.. #2 but it also saves a cookie on their computer to show the same ad..for every page they visit inside the website (for 1 hour)..

this is the code ..

First, the you need to add some code to functions.php in your theme’s folder (wp-content/themes/yourtheme folder, where yourtheme is the name of your theme). The following should be added immediately before the ?> at the bottom of the file:

********the code is already done..i know is a simple mistake..but can't find it..dont expect to charge too much for this favor.

$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) {
setcookie("sevisitor", 1, time()+3600, "/", ".yourdomain.com");
$sevisitor=true;
}
}

function fromasearchengine(){
global $sevisitor;
if ($sevisitor==true || $_COOKIE["sevisitor"]==1) {
return true;
}
return false;
}


CALL THE FUNCTION FROM ANY PHP PART OF YOUR SITE ..LIKE HEADER.PHP
<?php if (function_exists('fromasearchengine')) {
if (fromasearchengine()) { ?>
INSERT YOUR AD CODE HERE
<?php } } ?>

Skills required:
PHP, Wordpress
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 100
in 2 days
$ 40
in 1 days
$ 32
in 1 days
Hire DrTech76
$ 30
in 0 days
Hire aghoshx
$ 50
in 0 days
$ 50
in 5 days