Skip to content
Server
2013.04.20 08:08

PHP Proxy 가져오기

조회 수 14181 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

 

<?
$proxy_user = 'Michiel';
$proxy_pass = 'mypassword';
$proxy_url = 'myproxyurl:port';
$proxy = true;

$service_url = "https://www.myapiurltocall.com";
$service_user = 'user:password:FO';
$service_pass = 'password';

$ch = curl_init($service_url);

// Set proxy if necessary
if ($proxy) {
    curl_setopt($ch, CURLOPT_PROXY, $proxy_url);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy_user.':'.$proxy_pass);
    curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
    curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
}

// Set service authentication
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_USERPWD, "{$service_user}:{$service_pass}");

// HTTP headers
$headers['Authorization'] = 'Basic ' . base64_encode("$proxy_user:$proxy_pass");

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);   
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_TIMEOUT, 15);

//WARNING: this would prevent curl from detecting a 'man in the middle' attack
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

$data = curl_exec($ch);
?>

 

웹프록시 리스트 : http://incloak.com/proxy-list/?maxtime=500&type=h

로그인 후 댓글쓰기가 가능합니다.

?

  1. 14
    Jul 2012
    09:34

    mysql 실행이 안되거나 테이블(사용중) 손상이 잃어난 경우

    CategoryServer Views13083
    Read More
  2. 17
    Jul 2016
    13:00

    mysql 테이블 손상시 #1146 - Table 해결방법

    CategoryServer Views8910
    Read More
  3. 16
    Jul 2012
    10:28

    MYSQL 튜닝 이정도는 해야되지 않겠나?

    CategoryServer Views7991
    Read More
  4. 07
    Mar 2016
    23:25

    PHP Opcache 속도개선 시키기

    CategoryServer Views1832
    Read More
  5. 07
    Mar 2016
    23:40

    PHP Opcache 적용 전과 후의 비교

    CategoryServer Views1325
    Read More
  6. 20
    Apr 2013
    08:08

    PHP Proxy 가져오기

    CategoryServer Views14181
    Read More
  7. 05
    Mar 2016
    09:15

    PHP 가속기

    CategoryServer Views540
    Read More
  8. 02
    Apr 2013
    07:16

    php) curl_setopt의 옵션

    CategoryServer Views12939
    Read More
  9. 02
    Apr 2013
    12:10

    PHP) Example #1 HTML 엔티티 디코딩

    CategoryServer Views10179
    Read More
  10. 23
    Mar 2013
    12:19

    php) register_globals = on 으로 설정할 수 없는경우

    CategoryServer Views8521
    Read More
  11. 04
    Mar 2013
    11:12

    PHP) Web Proxy Server 만들기 소스

    CategoryServer Views15138
    Read More
  12. 23
    Mar 2013
    12:23

    php) 변수명을 변수값으로 지정방법

    CategoryServer Views8280
    Read More
  13. 24
    May 2013
    07:53

    php) 엑셀로 저장하기

    CategoryServer Views22066
    Read More
  14. 05
    Jul 2013
    08:06

    php) 이미지 사이즈 구해서 0이면 게시물 내용 없애기

    CategoryServer Views11285
    Read More
  15. 03
    Mar 2015
    23:55

    php.ini 파일설정으로 파일업로드 용량늘리기

    CategoryServer Views1152
    Read More
  16. 03
    Apr 2013
    18:52

    Proxy and hide ip address problem

    CategoryServer Views11999
    Read More
  17. 06
    Dec 2016
    15:42

    PuTTY Download Page(telnet,ftp,ssh)

    CategoryServer Views5509
    Read More
  18. 30
    Nov 2016
    05:32

    Server 성능 테스트

    CategoryServer Views585
    Read More
  19. 02
    Mar 2013
    11:18

    TIME_WAIT를 남기지 않는 세션종료 (Graceful Shutdown)

    CategoryServer Views11173
    Read More
  20. 06
    Dec 2016
    13:19

    V2824 User Manual

    CategoryServer Views11741
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소