Guest User

Untitled

a guest
Feb 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. function curl_se($set_url,$proxy){
  2.  
  3. $ch = curl_init($set_url);
  4. //set options
  5. $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
  6. $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
  7. $header[] = "Cache-Control: max-age=0";
  8. $header[] = "Connection: keep-alive";
  9. $header[] = "Keep-Alive: 300";
  10. $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
  11. $header[] = "Accept-Language: en-us,en;q=0.5";
  12. $header[] = "Pragma: "; //browsers keep this blank.
  13. //set options
  14. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
  15. curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3");
  16. curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
  17. curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  18. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  19. curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
  20. curl_setopt($ch, CURLOPT_PROXY, $proxy);
  21. curl_setopt($ch, CURLOPT_HEADER, false);
  22. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  23. $result = curl_exec($ch);
  24. echo "<pre>";
  25. print_r(curl_getinfo($ch));
  26. echo "</pre>";
  27. if(curl_errno($ch))
  28. return false;
  29. else
  30. return $result;
  31. }
  32.  
  33. $proxy = array(
  34. "91.83.216.186:8081",
  35. "190.116.88.11:8080",
  36. "117.102.9.116:8080",
  37. "188.165.4.38:3128",
  38. "187.120.209.10:8080",
  39. "190.186.50.32:3128",
  40. "190.108.83.30:8080",
  41. "190.130.230.149:8080",
  42. "130.180.18.24:8275",
  43. "178.33.181.120:8080"
  44. );
Add Comment
Please, Sign In to add comment