'wants_page_ru', '.net/wantsCommon.php' => 'wants_page_en', '.ru/index.php' => 'wants_main_ru', '.net/index.php' => 'wants_main_en', '.ru/aliexpressCheck.php' => 'check_ali_ru', '.net/aliexpressCheck.php' => 'check_ali_en', '.ru/topic/' => 'forum_ru', '.net/topic/' => 'forum_en', ]; $url = $_POST['url']; if(empty($url)) { $admitadParams = 'admitad_uid=7c013a5b03342fcef451f2d0737727a5&publisher_id=324487'; $letyDates = [ 'ls' => 'myparcels?', 'aliexpress-11-11' => 'aliexpress-11-11?', 'gearbest' => 'shops/gearbest?el=snippet&', 'cybermonday' => 'cmonday?', 'valentinesday' => 'valentines-day?', '8mar' => 'march-8?', 'hbgb' => 'hb-gearbest?', 'hbali' => 'hb-aliexpress?', 'hb3' => 'hb-letyshops?', 'hb3ali' => 'welcome?', // 2017-05-29 - 2017-05-31 '20170811' => 'shops/category:170450?', ]; foreach($letyDates as $key => $page) { if ($_GET['go'] == $key) { $url = "https://letyshops.ru/{$page}{$admitadParams}"; } } if(empty($url)) { if(strpos($_GET['url'], '.aliexpress.com') !== false) { $subID = 'ali'; if(preg_match('/^myparcels\.(?firefox|chrome)\.app$/is', trim($_GET['from']), $m)) { $subID = 'app_'.strtolower($m['app']); } else { foreach($subIDMap as $s => $r) { if(strpos($_SERVER["HTTP_REFERER"], $s) !== false) { $subID = $r; } } } $url = 'https://alitems.com/g/1e8d114494bd9f8407bb16525dc3e8/?subid='.$subID.'&ulp='.urlencode($_GET['url']); } } } if(empty($url)) { $url = 'https://alitems.com/g/1e8d114494bd9f8407bb16525dc3e8/?subid=seo'; } header('Location: '.$url);