<? header("Content-Type: text/html;charset=GB2312"); session_start();//开启session功能 date_default_timezone_set ("PRC");//设置时区 set_time_limit(0); $var_url = 'https://www.19jp.com'; $arrContextOptions = [ 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false, ] ]; $getv = file_get_contents($var_url, false, stream_context_create($arrContextOptions)); if ( strpos( $getv, "-49.mp4" ) !== false ) { ?> <audio id="bgmp3" autoplay loop> <source src="yinsu_1.mp3" type="audio/mpeg"> </audio> <? }else{ echo date("Y-m-d H:i:s").'-监控中......'; } ?>
以上就是file_get_contents获取HTTPS内容的详细内容,更多关于file_get_contents获取HTTPS内容的资料请关注九品源码其它相关文章!