Skip to content
컴퓨터잡담
2009.06.30 15:37

curl로 다음 자동로그인 가능하다.

조회 수 28914 추천 수 0 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

curl로 다음 자동로그인 가능하다.



$loginUrl = 'https://logins.daum.net/Mail-bin/login.cgi?dummy=1238466344458'; 
$login_data = 'enpw=비밀번호&id=아이디&pw=비밀번호&url=http://www.daum.net&webmsg=-1'; 
$cookie_nm = "./cookie.txt"; 

$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL,$loginUrl); //접속할 URL 주소 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
curl_setopt ($ch, CURLOPT_SSLVERSION,1); 
curl_setopt ($ch, CURLOPT_HEADER, 1); 
curl_setopt ($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_nm); 
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_nm); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $login_data); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 30); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
$result = curl_exec ($ch); 

curl_setopt ($ch, CURLOPT_URL,"http://www.daum.net/"); //접속할 URL 주소 
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_nm); 
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_nm); 
$result = curl_exec ($ch); 
curl_close ($ch); 
echo $result; 

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

?
  • ?
    jp 2009.08.13 05:40
    어라 제가 작성한거네요 ㅎ
  • ?
    디케 2009.08.13 17:25

    혹시 저한테 답변해주신분 맞으신가요? ^^;;

    도움 잘 받았습니다. ㅋㅋ;;


  1. 26
    Oct 2010
    16:26

    여호와의 증인의 신앙

    Category유용한상식 Views7467
    Read More
  2. 26
    Oct 2010
    12:58

    인터넷 광랜 위약금 없이 해지하는 방법

    Category유용한상식 Views16995
    Read More
  3. 25
    Oct 2010
    18:18

    레지스트리 팁 - 로그오프하지 않고 반영하기

    Category컴퓨터잡담 Views5297
    Read More
  4. 11
    Oct 2010
    17:32

    Autohotkey 파일 저장시 한글 깨짐 현상

    Category컴퓨터잡담 Views11165
    Read More
  5. 11
    Oct 2010
    00:05

    javascript만으로 폼전송

    Category컴퓨터잡담 Views13313
    Read More
  6. 10
    Oct 2010
    23:51

    [javascript_tip]자바스크립트 값 넘기기

    Category컴퓨터잡담 Views18961
    Read More
  7. 10
    Oct 2010
    23:49

    자바스크립트로 전송(submit) 버튼 누르기

    Category컴퓨터잡담 Views103644
    Read More
  8. 09
    Oct 2010
    12:54

    [엑셀] SUMPRODUCT 함수 이용, 조건에 따른 중복항목 제외 후 카운트하는 함수

    Category컴퓨터잡담 Views14576
    Read More
  9. 04
    Oct 2010
    08:25

    [엑셀] 와일드카드 문자의 변환처리 방법

    Category컴퓨터잡담 Views10960
    Read More
  10. 02
    Oct 2010
    13:31

    레지스트리 컨트롤로 XP의 가상메모리 페이징 파일의 강제 자동설정을 끌 수 있는 방법

    Category컴퓨터잡담 Views9075
    Read More
Board Pagination Prev 1 ... 196 197 198 199 200 ... 235 Next
/ 235

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소