質問編集履歴
5
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,4 +6,4 @@
|
|
6
6
|
|
7
7
|
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします
|
8
8
|
|
9
|
-
<?php /* Template Name: takeout */ ?> <?php if(have_posts()): while(have_posts()): the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>YOLP</title> <head> <body> <?php $id = '私のid'; $area= 13; $ct ='0114'; $start = '1'; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=100&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); $total = $xml ->ResultInfo->Total; $loop = (int)($total/100); $i = 0; while($i <= $loop){ $start = 100*$i+1; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=200&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); foreach($xml->Feature as $item){ echo $item->Name. ',' . $item->Property->Yomi .',' . $item->Property->Tel1 . ',' . $item->Property->Address . ',' . $item->Property->Station->Railway . $item->Property->Station->Name . '駅' .$item->Property->Detail->OfficialPcUrl1; echo '<br />'; } $i++; } ?>
|
9
|
+
<?php /* Template Name: takeout */ ?> <?php if(have_posts()): while(have_posts()): the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>YOLP</title> <head> <body> <?php $id = '私のid'; $area= 13; $ct ='0114'; $start = '1'; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=100&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); $total = $xml ->ResultInfo->Total; $loop = (int)($total/100); $i = 0; while($i <= $loop){ $start = 100*$i+1; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=200&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); foreach($xml->Feature as $item){ echo $item->Name. ',' . $item->Property->Yomi .',' . $item->Property->Tel1 . ',' . $item->Property->Address . ',' . $item->Property->Station->Railway . $item->Property->Station->Name . '駅' .$item->Property->Detail->OfficialPcUrl1; echo '<br />'; } $i++; } ?>
|
4
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
|
5
5
|
分かりにくい説明ですみません。例として挙げるなら、ホットペッパーや食べログみたいな店舗表示を目指しています。
|
6
6
|
|
7
|
-
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします
|
7
|
+
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします
|
8
8
|
|
9
|
-
|
9
|
+
<?php /* Template Name: takeout */ ?> <?php if(have_posts()): while(have_posts()): the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>YOLP</title> <head> <body> <?php $id = '私のid'; $area= 13; $ct ='0114'; $start = '1'; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=100&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); $total = $xml ->ResultInfo->Total; $loop = (int)($total/100); $i = 0; while($i <= $loop){ $start = 100*$i+1; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=200&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); foreach($xml->Feature as $item){ echo $item->Name. ',' . $item->Property->Yomi .',' . $item->Property->Tel1 . ',' . $item->Property->Address . ',' . $item->Property->Station->Railway . $item->Property->Station->Name . '駅' .$item->Property->Detail->OfficialPcUrl1; echo '<br />'; } $i++; } ?>'''
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,4 +4,6 @@
|
|
4
4
|
|
5
5
|
分かりにくい説明ですみません。例として挙げるなら、ホットペッパーや食べログみたいな店舗表示を目指しています。
|
6
6
|
|
7
|
-
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします。
|
7
|
+
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします。
|
8
|
+
|
9
|
+
''' <?php /* Template Name: takeout */ ?> <?php if(have_posts()): while(have_posts()): the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>YOLP</title> <head> <body> <?php $id = '私のid'; $area= 13; $ct ='0114'; $start = '1'; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=100&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); $total = $xml ->ResultInfo->Total; $loop = (int)($total/100); $i = 0; while($i <= $loop){ $start = 100*$i+1; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=200&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); foreach($xml->Feature as $item){ echo $item->Name. ',' . $item->Property->Yomi .',' . $item->Property->Tel1 . ',' . $item->Property->Address . ',' . $item->Property->Station->Railway . $item->Property->Station->Name . '駅' .$item->Property->Detail->OfficialPcUrl1; echo '<br />'; } $i++; } ?>'''
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,5 @@
|
|
3
3
|
どうすれば、YOLPの情報を文字列としてではなく、一つ一つの店舗として表示する事が出来ますか?
|
4
4
|
|
5
5
|
分かりにくい説明ですみません。例として挙げるなら、ホットペッパーや食べログみたいな店舗表示を目指しています。
|
6
|
+
|
7
|
+
因みに私が書いたphpコードは下記に掲載しました。 phpとwebapiの知識が全くないため、間違っているところがあると思います。 ご教授、お願いします。 <?php /* Template Name: takeout */ ?> <?php if(have_posts()): while(have_posts()): the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>YOLP</title> <head> <body> <?php $id = '私のid'; $area= 13; $ct ='0114'; $start = '1'; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=100&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); $total = $xml ->ResultInfo->Total; $loop = (int)($total/100); $i = 0; while($i <= $loop){ $start = 100*$i+1; $url = 'http://search.olp.yahooapis.jp/OpenLocalPlatform/V1/localSearch?appid='.$id.'&ac='.$area.'&gc='.$ct.'&results=200&start='.$start.'&detail=full'; $xml = simplexml_load_file( $url ); foreach($xml->Feature as $item){ echo $item->Name. ',' . $item->Property->Yomi .',' . $item->Property->Tel1 . ',' . $item->Property->Address . ',' . $item->Property->Station->Railway . $item->Property->Station->Name . '駅' .$item->Property->Detail->OfficialPcUrl1; echo '<br />'; } $i++; } ?>
|