[PHP-users 28185] Re: CURLでhttpsページを取得
okuyama@workgroup
okuyama @ workgroup.jp
2006年 1月 20日 (金) 13:55:23 JST
bool curl_exec ( int ch )
$B$H$"$k$h$&$K!"(Bcurl_exec$B$NLa$jCM$O!"(Bbool $B$G$9!#(B
$B7k2L$r<hF@$9$k$K$O!"0J2<$N$h$&$K!"=PNO@)8f4X?t$rMxMQ$9$kI,MW$,$"$k$N$G$O!)(B
ob_start();
curl_exec($ch);
curl_close($ch);
$data = ob_get_contents();
$B(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(.(B
$B(.(,(,(,(/(B
$B(-!@!2!?(-%"%$!&%F%#!&%3%`(B [ITCOM]
$B(1(,(,(,(0!!!!!!1|;3!!FXFs(B (Atsuji Okuyama)
$B(.(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(B
$B(.(#!!(B
$B(.(#!!")(B176-0002$B!!El5~ETN}GO6h:yBf(B 5-40-21
$B(.(#!!!!!!!!!!!!!!%(%/%;%k:yBf(B 2F ($BM-(B)NUS $BFb(B
$B(.(B
> -----Original Message-----
> From: php-users-bounces @ php.gr.jp
> [mailto:php-users-bounces @ php.gr.jp] On Behalf Of fujimo
> Sent: Friday, January 20, 2006 1:34 PM
> To: php-users @ php.gr.jp
> Subject: [PHP-users 28172]CURL$B$G(Bhttps$B%Z!<%8$r<hF@(B
>
> $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(B
$B$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 メーリングリストの案内