[PHP-users 28172] CURLでhttpsページを取得

fujimo fujimoto @ plala.co.jp
2006年 1月 20日 (金) 13:33:46 JST


$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 メーリングリストの案内