[PHP-users 28177] Re: CURLでhttpsページを取得

Taniguchi taniguchi @ voice-bank.co.jp
2006年 1月 20日 (金) 16:29:39 JST


$BC+8}$H?=$7$^$9!#(B

$B0JA0!";d$bF1$8>u67$K$J$C$?$3$H$,$"$j$^$7$F!"(B
$B$=$N;~$O(Bcurl$B%b%8%e!<%k$N%$%s%9%H!<%k$N:]$K!!(B--without-ssl$B!!$G(B
$B%$%s%9%H!<%k$7$F$$$?$i$7$/!":FEY!!(B--with-ssl$B!!$G%$%s%9%H!<%k$7D>$7$?$i(B
$B$&$^$/:nF0$7$^$7$?!#(B

$B2r7h:v$K$J$k$+$O$o$+$j$^$;$s$,!";29M$^$G$K!#(B

$B!!(B
fujimo wrote:

>$BF#K\$H?=$7$^$9!#(B
>
>
>curl$B$rMxMQ$7$F(Bhttps$B%Z!<%8$+$i$N%j%?!<%s$r<hF@$9$k=hM}$r:n @ .$7$F$$$^$9!#(B
>
>$B=hM}$OF0:n$7$F$$$k$h$&$J$N$G$9$,!"08 @ h$X<B:]%"%/%;%9$r9T$C$F$$$J$$$h$&$G$9!#(B
>
>
>$BN`;w$N;vNc$KBP=h$5$l$?J}$J$I(B
>$B$*$i$l$^$7$?$i!"$465<x$$$?$@$1$J$$$G$7$g$&$+!)(B
>
>
>
>PHP/4.1.2
>
>----$B%=!<%9(B---------------------------------
>
>$url = "https://220.220.***.***/handle_raw_post.php";
>$ch = curl_init($url);
>
>$fp = fopen("hoge.txt", "r");
>
>curl_setopt($ch, CURLOPT_SSLVERSION,3);
>curl_setopt($ch, CURLOPT_HEADER, 0);
>curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>curl_setopt($ch, CURLOPT_VERBOSE, 1);
>$data = curl_exec($ch);
>curl_close($ch);
>echo $data;
>
>$B"(<B:]$O!"(B$url$B$O(Bip$B%"%I%l%9$r;XDj$7$F$*$j$^$9!#(B
>
>
>--- $B=hM}7k2L(B ----------------------------
>$php$B!!(Bxmlcurl.php$B!!(B
>
>* Closing live connection (#0)
>X-Powered-By: PHP/4.1.2
>Content-type: text/html
>
>$B$,I=<((B
>
>hoge.txt$B$K$O!"(Ba$B!!$,=q$-=P$5$l$k!#(B
>
>-- $B08 @ h%5!<%P>u67(B -----------------------------
>
>apache$B$N(Baccess_log$B!"(Bssl_request_log$B!!6&$K%"%/%;%9%m%0$J$7(B
>
>
>
>---  $BHf3S%F%9%H(B -------------------------------
>$B-!%/%i%$%"%s%HC<Kv$N%V%i%&%6$+$iD>@\(B
>$B!!!V(Bhttps://220.220.***.***/handle_raw_post.php$B!W$K$?$?$/(B
>
>$B!!"M @ 5>o$J%a%C%;!<%8$,La$k(B
>
>$B-"(Bphp$B$N$"$k%G%#%l%/%H%j$h$j(Bcurl$B$rD>@\A`:n(B
>$B!!(Bcurl -F "GRS_CMD=<./hoge.txt" https://220.220.***.***/handle_raw_post.php
>$B!!"M @ 5>o$J%a%C%;!<%8$,La$k(B
>
>
>
>
>$B0J>e$G$9!#(B
>$B$I$&$>$h$m$7$/$*4j$$$$$?$7$^$9!#(B
>
>
>
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>PHP-users mailing list  PHP-users @ php.gr.jp
>http://ns1.php.gr.jp/mailman/listinfo/php-users
>PHP$B=i?4<T$N$?$a$N%Z!<%8(B - $B<ALd$9$kA0$K$O$3$A$i$r$*FI$_$/$@$5$$(B
>http://www.php.gr.jp/php/novice.php3
>


PHP-users メーリングリストの案内