# outlink.php
### argumentti to voi olla travellink, ebookers jne...
$site = $_GET['site'];
if($site == "lomarengas") { $url = "http://clk.tradedoubler.com/click?p=63234&a=1539446&g=17650804"; }
if($site == "alppimatkat") { $url = "http://clk.tradedoubler.com/click?p(136403)a(1539446)g(18219148)"; }
if($site == "travellink") { $url = "http://ad.zanox.com/ppc/?13691029C1346684136T"; }
if($site == "levi") { $url = "http://clk.tradedoubler.com/click?p=61764&a=1539446&g=17159222"; }
if($site == "hotelscom") { $url = "http://clk.tradedoubler.com/click?p=24238&a=1539446&g=0"; }
if($site == "scandic") { $url = "http://clk.tradedoubler.com/click?p=22064&a=1539446&g=16139916"; }
if($site == "bookingcom") { $url = "http://www.booking.com/index.html?aid=310100"; }
#if($site == "finnmatkat") { $url = "http://clk.tradedoubler.com/click?p=47080&a=1539446&g=16703808"; }
if($site == "finnmatkat") { $url = "http://ad.zanox.com/ppc/?15788242C1084918034T"; }
if($site == "finnmatkatakkilahdot") { $url = "http://clk.tradedoubler.com/click?p(47080)a(1539446)g(16703808)url(http://www.finnmatkat.fi/Edut-ja-tarjoukset/Tarjoukset/Akkilahdot/)"; }
if($site == "finnmatkatakkilahdot") { $url = "http://ad.zanox.com/ppc/?15788242C1084918034T"; }
if($site == "blue1") { $url = "http://clk.tradedoubler.com/click?p=69021&a=1539446&g=17302636"; }
if($site == "kalevatravel") { $url = "http://clk.tradedoubler.com/click?p=115257&a=1539446&g=18250612"; }
if($site == "area") { $url = "http://clk.tradedoubler.com/click?p=38486&a=37920&g=16333946"; }
if($site == "hispania") { $url = "http://clk.tradedoubler.com/click?p=73323&a=1539446&g=17560194"; }
if($site == "omenahotels") { $url = "http://clk.tradedoubler.com/click?p=118866&a=1539446&g=18049740"; }
if($site == "lomamatkat") { $url = "http://ad.zanox.com/ppc/?15788242C1084918034T"; }
if($site == "matkavekka") { $url = "http://ad.zanox.com/ppc/?15774509C87610741T"; }
/// tämän zanox-koodi on fb-sivua varten:
if($site == "lomamatkatkisafb") { $url = "http://ad.zanox.com/ppc/?16496510C1455748306T&ULP=[[http://www.lomamatkat.fi/Kampanjat/kilpailu/osallistu/]]"; }
if($site == "apollomatkatfb") { $url = "http://clk.tradedoubler.com/click?p=197250&a=1873479&g=19180446"; }
if($site == "blue1fb") { $url = "http://clk.tradedoubler.com/click?p=69021&a=1873479&g=17302636"; }
if($site == "travellinkfb") { $url = "http://ad.zanox.com/ppc/?17299475C555797870T"; }
if($site == "travelstartfb") { $url = "http://clk.tradedoubler.com/click?p=70646&a=1873479&g=17395562"; }
if($site == "lomamatkatfb") { $url = "http://clk.tradedoubler.com/click?p=200294&a=1873479&g=19307784"; }
if($site == "czechfb") { $url = "http://ad.zanox.com/ppc/?17701881C610359986T"; }
if($site == "hotelscomalefb") { $url = "http://clk.tradedoubler.com/click?p=24238&a=1873479&g=11769638"; }
if($site == "ebookersfb") { $url = "http://clk.tradedoubler.com/click?p=406&a=1873479&g=0"; }
if($site == "aerlingusfb") { $url = "http://clk.tradedoubler.com/click?p=202324&a=1873479&g=19430664"; }
if($site == "hispaniafb") { $url = "http://clk.tradedoubler.com/click?p=73323&a=1873479&g=0"; }
if($site == "matkavekkafb") { $url = "http://ad.zanox.com/ppc/?16474295C44164786T"; }
if($site == "lomarengasfb") { $url = "http://clk.tradedoubler.com/click?p=63234&a=1873479&g=19467530"; }
if($site == "euroadsfb") { $url = "http://tracking.euroads.fi/system/tracking.php?sid=6&cpid=751&adid=23742&acid=1269&eatrackid=13146"; }
if($site == "ebookersfbdeep") { $url = "http://clk.tradedoubler.com/click?p(406)a(1873479)g(81448)url(http://www.ebookers.fi/lennot/finnair-kesahinnat/)"; }
if($site == "flybefb") { $url = "http://tracking.euroads.fi/system/tracking.php?sid=6&cpid=807&adid=24528&acid=1269&eatrackid=13146"; }
if($site == "euroadsfb2") { $url = "http://tracking.euroads.fi/system/tracking.php?sid=6&cpid=858&adid=25026&acid=1269&eatrackid=13146"; }
if($site == "airfinlandfb") { $url = "http://www.airfinlandholidays.fi/tt/?tt=3646_126808_89830_&r="; }
if($site == "euroadsjoulukisa") { $url = "http://tracking.euroads.fi/system/tracking.php?sid=6&cpid=901&adid=25357&acid=1269&eatrackid=13146"; }
if($site == "omenafb") { $url = "http://clk.tradedoubler.com/click?p(118866)a(1873479)g(17985542)"; }
if($site == "alppimatkatfb") { $url = "http://clk.tradedoubler.com/click?p(136403)a(1873479)g(18219148)"; }
if($site == "matkapojatfb") { $url = "http://www.matkapojat.fi/tt/?tt=5191_188004_89830_&r="; }
if($site == "elamyslahjatfb") { $url = "http://clk.tradedoubler.com/click?p=193862&a=1873479&g=18900424"; }
if($site == "sasfb") { $url = "http://clk.tradedoubler.com/click?p=69021&a=1873479&g=17614768"; }
if($site == "lufthansafb") { $url = "http://clk.tradedoubler.com/click?p=227749&a=1873479&g=21000760"; }
if($site == "lowcostfb") { $url = "http://ad.zanox.com/ppc/?25126201C903437491T"; }
# not for fb
if($site == "aerlingus") { $url = "http://clk.tradedoubler.com/click?p(202324)a(1603138)g(19430664)"; }
if($site == "airberlin") { $url = "http://clk.tradedoubler.com/click?p(206606)a(1603138)g(19774940)"; }
if($site == "flybe") { $url = "http://tracking.euroads.fi/system/tracking.php?sid=6&cpid=807&adid=27582&acid=1269&eatrackid=13145"; }
if($site == "sas") { $url = "http://clk.tradedoubler.com/click?p=69021&a=1603138&g=20869746"; }
$path = getcwd();
$pagenamebb = $site;
define("_BBC_PAGE_NAME", $pagenamebb);
define("_BBCLONE_DIR", $path."/bbout/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
$ip = $_SERVER['REMOTE_ADDR'];
$useragent = $_SERVER['HTTP_USER_AGENT'];
$address = gethostbyaddr ($ip);
$tld = substr($address, strpos($address, ".") + 1);
if(strstr($tld, "tfbnw.net")):
exit;
endif;
if(strstr($useragent, "facebookexternalhit")):
echo "link";
exit;
endif;
if(strstr($useragent, "Googlebot")):
print '';
exit;
endif;
if($url != ""):
header('Location: '.$url);
else:
print '';
endif;
?>