ニコニコヘッドライン

<?php
//XMLデータ取得用ベースURL
    
$req = "http://www.nicovideo.jp/api/getheadline";


  
//XMLファイルをパースし、オブジェクトを取得
      
$xml = simplexml_load_file($req)
       or die(
"XMLパースエラー");

    
//var_dump($xml);
    
$str = $xml->news_txt;

    echo
"右上「"."$str"."」";


?>


実行結果


Warning: simplexml_load_file() [function.simplexml-load-file]: SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in /home/freeuser/pro10/htdocs/nicomigi.php on line 34

Warning: simplexml_load_file() [function.simplexml-load-file]: Failed to enable crypto in /home/freeuser/pro10/htdocs/nicomigi.php on line 34

Warning: simplexml_load_file(http://www.nicovideo.jp/api/getheadline) [function.simplexml-load-file]: failed to open stream: operation failed in /home/freeuser/pro10/htdocs/nicomigi.php on line 34

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://www.nicovideo.jp/api/getheadline" in /home/freeuser/pro10/htdocs/nicomigi.php on line 34
XMLパースエラー

yVoC[UNLIMITȂ1~] ECirŃ|C Yahoo yV LINEf[^[Ōz500~`I


z[y[W ̃NWbgJ[h COiq 萔O~ył񂫁z COsیI COze