Find Jobs
Hire Freelancers

Add Cookie To My Search Engine Only Script

$25-30 USD

Anulowano
Opublikowano ponad 12 lat temu

$25-30 USD

Płatne przy odbiorze
I switched my site over to a caching system and now I'm having problems with my plugin that only showed ads to people coming from search engines (better quality clicks that way). So I decided to search the internet for a javascript alternative and I found one, but I need a simple change made. I need the script to add a cookie that expires after a certain amount of time. The cookie should make it so the visitor continues to see the ad for an hour or so after coming from the Search Engines. I also want a version that only shows ads to non-search engine visitors. I want the code that I put on my site to look like this: <script type="text/javascript" src="/folder/[login to view URL]"></script> <script type="text/javascript">myvisitor();</script> Most of the work has already been done: [login to view URL] [login to view URL] So it shouldn't take that long. I have examples below. ## Deliverables -----------Change This Code:A1611------------------ URL: /folder/[login to view URL] var ref = [login to view URL]; var sevisitor; var SE = new Array('[login to view URL]', 'search.', '[login to view URL]', '[login to view URL]', '.yahoo.','/url','/search','.google.','.ask.','.baidu.','.bing.','.aol.','.answers.'); for ( var source in SE){ var match = [login to view URL](SE[source]); if (match !=-1) { sevisitor=true; } } function myvisitor(){ if (sevisitor){ var large = 'You Are A Search Engine Visitor<br>'; [login to view URL](large); } } -----------END CODE------------------ What I add to my page: ---code I add to my page---- <script type="text/javascript" src="/folder/[login to view URL]"></script> <script type="text/javascript">myvisitor();</script> ---code I add to my page---- Is it possible to change that code that I "add to my page" into php so that the text is crawled by the search engines without changing "[login to view URL]"? ---Example Code That Sets Cookie--- <script type='text/javascript'> //<![CDATA[ var ref = [login to view URL]; var se = new Array('/search?', 'images.google.', '[login to view URL]', 'search.', '[login to view URL]', '[login to view URL]', '/search/', '.yahoo.'); var sevisitor = false; for (var i = 0; i <= se.length-1; i++) { if ([login to view URL](se[i])!== -1) { var expiry = new Date (); [login to view URL]([login to view URL]() + 3600000); [login to view URL] = "sevisitor=1; expires=" + expiry + "; path=/; domain=[login to view URL]"; sevisitor = true; } } //]]> </script> ---Example Code That Sets Cookie--- I want two versions of this script. One that shows ads to search engine visitors only and one that shows ads to visitors not coming from the search engines. Both of should add a cookie like the example shown.
Identyfikator projektu: 3593271

Informację o projekcie

Zdalny projekt
Aktywny 13 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne

O kliencie

Flaga UNITED STATES
Saint Louis, United States
5,0
104
Członek od sty 7, 2008

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.