PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- $cookie_file = $_SERVER['DOCUMENT_ROOT'].'/offers/cookies_teztour.txt';
- $teztour_login="LOGIN";
- $teztour_passwd="PASS";
- $host = "online.teztour.com";
- $url = "/UserServer/login.htm";
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2');
- curl_setopt($ch, CURLOPT_REFERER, 'http://online.teztour.com/UserServer/index.htm?ref=http%3A%2F%2Fonline.teztour.com%2Farmmanager%2F');
- сurl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
- $header[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
- $header[] = 'Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7';
- $header[] = 'Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3';
- $header[] = 'Pragma: ';
- $fields[] = 'j_password='.$teztour_passwd;
- $fields[] = 'j_username='.$teztour_login;
- $fields[] = 'ref=http://online.teztour.com/armmanager/';
- $fields[] = 'submit=Войти / Sign in';
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2');
- curl_setopt($ch, CURLOPT_REFERER, 'http://online.teztour.com/armmanager/workplace/section/tour-search');
- $fields[] = 'accommodationId='.$price['room'];
- $fields[] = 'after='.$price['depature_date'];
- $fields[] = 'before='.$price['depature_date'];
- $fields[] = 'cityId='.$price['city_from'];
- $fields[] = 'countryId='.$price['country'];
- $fields[] = 'currency='.$price['currency'];
- $fields[] = 'hotelClassBetter=true';
- $fields[] = 'hotelClassId=2567';
- $fields[] = 'hotelId='.$price['hotel'];
- $fields[] = 'hotelInStop=true';
- $fields[] = 'locale=ru';
- $fields[] = 'nightsMax='.$price['days'];
- $fields[] = 'nightsMin='.$price['days'];
- $fields[] = 'noTicketsFrom=false';
- $fields[] = 'noTicketsTo=false';
- $fields[] = 'priceMax='.$price['price'];
- $fields[] = 'priceMin='.$price['price'];
- $fields[] = 'rAndBBetter=true';
- $fields[] = 'rAndBId=15350';
- $fields[] = 'specialInStop=undefined';
- $fields[] = 'tourId='.$price['city_to'];
- $fields[] = 'tourType=1';
- $fields[] = 'version=2';