Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by JetBrains PhpStorm.
- * User: hexxy
- * Date: 2/3/16
- * Time: 9:43 PM
- * To change this template use File | Settings | File Templates.
- */
- function initCurl($Url){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $Url);
- curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookie.txt');
- $headers = [
- 'Host: olymptrade.com',
- 'Connection: keep-alive',
- 'Cache-Control: max-age=0',
- 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
- 'Upgrade-Insecure-Requests: 1',
- 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',
- 'Accept-Language: en-US,en;q=0.8,ru;q=0.6',
- 'Cookie: jv_enter_ts_5hPq7ITZ0Q=1451336079735; jv_visits_count_5hPq7ITZ0Q=1; jv_email_5hPq7ITZ0Q=hexxyg%40gmail.com; jv_client_name_5hPq7ITZ0Q=Andrey; _ym_uid=1451336522319185580; jv_client_id_5hPq7ITZ0Q=192256.3L0krHeZgxrO2a9%2Bk8yAHno2YLC4BXMIPbX2cjVpjK0; jv_pages_count_5hPq7ITZ0Q=15; jv_gui_state_5hPq7ITZ0Q=WIDGET; ref_c=olymp; ref=olymp; land=olymp; checked=1; dguid=_539326; _ym_isad=1; props[deal_oneClick]=true; props[chart_periodl]=1; props[chart_format]=line; _gat=1; session=0df246u3d70l253046ducjaoj5; _ga=GA1.2.856487965.1451336077'
- ];
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_TIMEOUT, 10);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- return $ch;
- }
- function setPostData($curl, $data)
- {
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
- }
- function getResponse($curl)
- {
- $output = curl_exec($curl);
- return $output;
- }
- $curl = initCurl('https://olymptrade.com');
- $data = getResponse($curl);
- curl_setopt($curl, CURLOPT_URL, 'https://olymptrade.com/user/login?_=1454526316.06');
- // login
- $postData = urlencode('email=hexxyg@gmail.com&password=astharot&remember=true');
- setPostData($curl, $postData);
- $data = getResponse($curl);
- curl_setopt($curl, CURLOPT_URL, 'https://olymptrade.com/platform');
- curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
- curl_setopt($curl, CURLOPT_POST, false);
- curl_setopt($curl, CURLOPT_POSTFIELDS, null);
- $data = getResponse($curl);
- curl_setopt($curl, CURLOPT_URL, 'https://olymptrade.com/user/playdemo?_=1454527045.039');
- $data = getResponse($curl);
- curl_setopt($curl, CURLOPT_URL, 'https://olymptrade.com/deal/open?amount=100&duration=60&dir=up&pair=EURUSD&source=platform');
- $data = getResponse($curl);
- echo $data;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement