二つのapiをマッシュアップさせる方法を教えてください。
使うapiはホットペーパーとヤフーです。
ぐるなびapiから取得できる写真をホットペーパーapiから取得した情報を表示したphpファイルに表示したいのですが、この場合何を使えばヤフーapiの写真がphpファイルに表示されますか?
一応書いたのですが、エラーでした。
php
1<?php 2$key='私のkey'; 3$count=1; 4$start =1; 5$area=""; 6$format='xml'; 7$url='http://webservice.recruit.co.jp/hotpepper/gourmet/v1/?key='.$key.'&count='.$count.'&large_area='.$large_area.'&start='.$start.'&format='.$format; 8$xml=simplexml_load_file($url); 9$total_count=$xml->results_available; 10?> 11<?php 12 $appid= '私のkey'; 13 $item_per_page = 10; 14 $ct = '01'; 15 $id =<?php $r->id; ?> 16 $start =1; 17 $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid=' . $id . '&ac=' . $area .'&gc='. $ct.'&results=' . $item_per_page . '&id=' . $id . '&start=' . $start . '&detail=full'; 18 $xml = simplexml_load_file( $url ); 19 $total_count = $xml->ResultInfo->Total; 20?> 21 22<?php if(!$xml->shop){ echo 'No result!!'; 23} else { 24?> 25 26 27 28<html> 29<body> 30<table border="1"> 31<?php foreach($xml->shop as $r){ ?> 32<?php foreach ( $xml->Feature as $key => $item ) { ?> 33<table border="1"> 34 <tr> 35 <td> 36 <?php echo $r->address; ?> 37 </td> 38 </tr> 39 <tr> 40 <td> 41 <?php echo $r->access; ?> 42 </td></tr> 43 <tr><td> 44 <?php echo $r->budget->average; ?> 45 </td></tr> 46 <tr> 47 <td> 48 <?php echo $r->non_smoking; ?> 49 <?php $item->Property->Tel1; ?> 50 </td> 51 </tr> 52 </table> 53 </body> 54 <?php 55 } 56 } 57 ?> 58 <?php 59 } 60 } 61 ?> 62 </html>