現在、韓半島の雲の写真2
以前に作成した朝鮮半島の雲の写真のページhttp://hanury.net/wp/astro/claud/がホスト起動後、サーバーの設定によってアンドルア行ってしまった。
ホスティングマトギンcafe24でphp 5をサポートしなくて
•php4でstream_get_contents()のサポートがダメで、
•sensitive URL Openを防いだが、仕方なく
fopen ( $url , 'r' ) ; $ fp = fopen($ url、 'r');
stream_get_contents ( $fp ) ; $ str = stream_get_contents($ fp);
stream_get_contents ( $fp ) ; $ str = stream_get_contents($ fp);
上2行クトナドンコードを
my_stream_get_contentsと関数を追加してくれて(php4でないため)
fopenだけヨルドンことsocketを利用して開くように修正する必要がした...
) { function my_stream_get_contents($ fp){
"" ; $ buf = "";
! feof ( $fp ) ) { while(!feof($ fp)){
fread ( $fp , 1024 * 8 ) ; $ buf = fread($ fp、1024 * 8);
}
$buf ) ; return($ buf);
}
fsockopen ( $host , 80 , $errno , $errstr , 12 ) ; $ fp = fsockopen($ host、80、$ errno、$ errstr、12);
, "GET $url HTTP/1.0 \r \n " ) ; fputs($ fp、 "GET $ url HTTP/1.0 \ r \ n");
, "Host: $host \r \n " ) ; fputs($ fp、 "Host:$ host \ r \ n");
, "Referer: http://$host \r \n " ) ; fputs($ fp、 "Referer:http:// $ host \ r \ n");
, "User-Agent:Mozilla/4.0(compatible;MSIE6.0;Windows NT5.1) \r \n \r \n " ) ; fputs($ fp、 "User-Agent:Mozilla/4.0(compatible; MSIE6.0、Windows NT5.1)\ r \ n \ r \ n");
my_stream_get_contents ( $fp ) ; $ str = my_stream_get_contents($ fp);
"" ; $ buf = "";
! feof ( $fp ) ) { while(!feof($ fp)){
fread ( $fp , 1024 * 8 ) ; $ buf = fread($ fp、1024 * 8);
}
$buf ) ; return($ buf);
}
fsockopen ( $host , 80 , $errno , $errstr , 12 ) ; $ fp = fsockopen($ host、80、$ errno、$ errstr、12);
, "GET $url HTTP/1.0 \r \n " ) ; fputs($ fp、 "GET $ url HTTP/1.0 \ r \ n");
, "Host: $host \r \n " ) ; fputs($ fp、 "Host:$ host \ r \ n");
, "Referer: http://$host \r \n " ) ; fputs($ fp、 "Referer:http:// $ host \ r \ n");
, "User-Agent:Mozilla/4.0(compatible;MSIE6.0;Windows NT5.1) \r \n \r \n " ) ; fputs($ fp、 "User-Agent:Mozilla/4.0(compatible; MSIE6.0、Windows NT5.1)\ r \ n \ r \ n");
my_stream_get_contents ( $fp ) ; $ str = my_stream_get_contents($ fp);
あ! ますますコード汚れている。








