<?php

include('../conf.php');

Auth2($l,$p,$m);

if(strlen($_POST['jsCode'])<5){
	exit($GLOBALS['lang']['mes7']);
}

$PostData='jsCode='.urlencode($_POST['jsCode']);

print Request($PostData,'http://new-api3278.spacetechnology.net/gen/api/postOBF.php');

function Request($PostRequest,$url,$form=false){
  $header[]='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
  $header[]='Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3';
  $header[]='Accept-Encoding: gzip, deflate';
  if($form){
    $header[]='Content-Type: application/x-www-form-urlencoded';
  }

  $header[]='Connection: close';

  $ch=curl_init();
  curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_HEADER,0);
  curl_setopt($ch,CURLOPT_ENCODING,'utf-8');
  curl_setopt($ch,CURLOPT_REFERER,$url);
  curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36');
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch,CURLOPT_FOLLOWLOCATION,0);
  curl_setopt($ch,CURLOPT_COOKIE,'');
  curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
  curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
  curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
  curl_setopt($ch,CURLOPT_TIMEOUT,50);
  curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,50);
  if($PostRequest!=='get'){
    curl_setopt($ch,CURLOPT_POST,1);
    curl_setopt($ch,CURLOPT_POSTFIELDS,$PostRequest);
  }
  $result=curl_exec($ch); curl_close($ch); return($result);
}

mysqli_close($connect);

?>