Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. <?php
  2.  
  3. header("Access-Control-Allow-Origin: *");
  4.  
  5. function get_ip()
  6. {
  7. if (!empty($_SERVER['HTTP_CLIENT_IP']))
  8. {
  9. $ip=$_SERVER['HTTP_CLIENT_IP'];
  10. }
  11. elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
  12. {
  13. $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
  14. }
  15. else
  16. {
  17. $ip=$_SERVER['REMOTE_ADDR'];
  18. }
  19. return $ip;
  20. }
  21.  
  22. $furl = $_GET['url'];
  23.  
  24.  
  25.  
  26. $url = 'http://pbmyzt3icp57yyyt.onion/domains/urlget';
  27.  
  28.  
  29.  
  30. $ip = get_ip();
  31.  
  32.  
  33.  
  34. //$param = '?ip='. $ip . '. '&agent=' . $agent;
  35.  
  36. $params=http_build_query(['ip' => get_ip()]);
  37.  
  38.  
  39. //$req_url = $url . $params;
  40.  
  41.  
  42. $ch = curl_init();
  43.  
  44. curl_setopt($ch, CURLOPT_URL,$url);
  45. curl_setopt($ch, CURLOPT_POST, 1);
  46. curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9150');
  47. curl_setopt($ch, CURLOPT_PROXYTYPE, 7);
  48. curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
  49.  
  50. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  51. $data = curl_exec ($ch);
  52.  
  53. curl_close ($ch);
  54.  
  55. $obj = json_decode($data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement