Closed

Show Ads To Search Engine Visitors Only (Wordpress)

This project received 6 bids from talented freelancers with an average bid price of $50 USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
N/A
Total Bids
6
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 [url removed, login to view] 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.', '[url removed, login to view]', 'search.', '[url removed, login to view]', '[url removed, login to view]', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) {
setcookie("sevisitor", 1, time()+3600, "/", ".[url removed, login to view]");
$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 [url removed, login to view]
<?php if (function_exists('fromasearchengine')) {
if (fromasearchengine()) { ?>
INSERT YOUR AD CODE HERE
<?php } } ?>

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online