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. 19
    May 2013
    13:20

    인터넷 익스플로러 개발자도구 해제 시키는 방법

    Category컴퓨터잡담 Views22425
    Read More
  2. 13
    May 2013
    08:11

    Apache & Mysql 셋팅방법(httpd-mpm.conf / my.ini)

    CategoryServer Views13709
    Read More
  3. 11
    May 2013
    11:14

    Windows에서 4GB 메모리 인식시키기(설정방법)

    Category컴퓨터잡담 Views9767
    Read More
  4. 10
    May 2013
    18:48

    Full HD Digital TV 1080i 와 1080p 차이점

    Category컴퓨터잡담 Views13252
    Read More
  5. 27
    Apr 2013
    09:25

    무선 인터넷의 속도와 품질 이해

    Category컴퓨터잡담 Views9024
    Read More
  6. 26
    Apr 2013
    08:35

    안드로이드 동영상 재생시 파란색 물음표 박스만 나올때 조치방법

    Category컴퓨터잡담 Views39286
    Read More
  7. 20
    Apr 2013
    09:24

    IP공유기 각사별 초기세팅값

    Category컴퓨터잡담 Views6320
    Read More
  8. 20
    Apr 2013
    08:08

    PHP Proxy 가져오기

    CategoryServer Views14181
    Read More
  9. 18
    Apr 2013
    14:27

    텍스트를 한글로 읽어주는 사이트

    Category컴퓨터잡담 Views9529
    Read More
  10. 10
    Apr 2013
    08:11

    Google Chart API 이용하기

    CategoryServer Views20893
    Read More
  11. 08
    Apr 2013
    18:30

    html) Google Charts API 활용 그래프 만들기

    CategoryWindowsTip Views9611
    Read More
  12. 03
    Apr 2013
    18:52

    Proxy and hide ip address problem

    CategoryServer Views11999
    Read More
  13. 03
    Apr 2013
    18:38

    아파치 성능테스트 프로그램

    CategoryServer Views14034
    Read More
  14. 02
    Apr 2013
    14:39

    웹 페이지에 HTML5 동영상 컨트롤 추가

    CategoryServer Views9459
    Read More
  15. 02
    Apr 2013
    12:10

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

    CategoryServer Views10179
    Read More
  16. 02
    Apr 2013
    07:16

    php) curl_setopt의 옵션

    CategoryServer Views12939
    Read More
  17. 01
    Apr 2013
    18:39

    make ping with PHP(핑테스트)

    CategoryServer Views11145
    Read More
  18. 29
    Mar 2013
    08:25

    Windows ARP Spoofing

    CategoryWindowsTip Views11955
    Read More
  19. 29
    Mar 2013
    08:22

    네트워크에 있는 다른 시스템과 ip 주소가 충돌합니다.

    CategoryWindowsTip Views38112
    Read More
  20. 23
    Mar 2013
    23:37

    은행,방송사 악성코드??? 업무만 보는데 바이러스가 걸리나?

    Category컴퓨터잡담 Views4629
    Read More
Board Pagination Prev 1 ... 17 18 19 20 21 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소