Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $api_url = 'http://api.se.com:81/';
- $root_dir = '/';
- $request = $_SERVER['REQUEST_URI'];
- function send_get($url, $refer = ''){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_REFERER, $refer );
- curl_setopt($ch, CURLOPT_COOKIE, $key );
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0');
- curl_setopt($ch, CURLOPT_VERBOSE,1);
- return $result = curl_exec($ch);
- }
- if(preg_match("/api2/i", $request)
- {
- include DIR . '/api2/api2.php'
- }
- else
- {
- $request = str_replace($root_dir, '', $_SERVER['REQUEST_URI']);
- echo send_get($api_url.$request, '');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement