Yahoo boss APIに関心を持ってPHPをはじめました中村です。 いろいろ、調べましたが何を調べれべよいのか分からず、 的ハズレな事ばかりしております。 どなたかに教えていただきたいのは、 SimpleXMLElementに日本語を渡す方法です。 下記のsampleのqueryに英数例えば'JAVA'等では検索結果は正しく表示されますが、 日本語を渡すとうまくうごかないのです。 また、 href="http://boss.yahooapis.com/ysearch/web/v1/麻生総理?appid=自分の Appid&format=xml&lang=jp®ion=jpでは 正しくXMLが帰ってきます。 どうすればSimpleXMLElementに日本語を渡すことができるのでしょうか? <?php $searchQuery = rawurlencode(stripslashes($_REQUEST['query'])); $count = $_REQUEST['count']; $Appid = "自分のAppid"; $Site=""; if(!empty($searchQuery)) { if(!empty($count)) { $count +=10; $results = new SimpleXMLElement('http://boss.yahooapis.com/ysearch/web/v1/'.$searchQuery.$S ite.'?appid='.$Appid.'&count=10&format=xml&start='.$count,NULL,TRUE); } else { $count=10; $results = new SimpleXMLElement('http://boss.yahooapis.com/ysearch/web/v1/'.$searchQuery.$S ite.'?appid='.$Appid.'&count=10&format=xml',NULL,TRUE); } } ?>