回答編集履歴
1
urlencodeが必要だったので修正
test
CHANGED
@@ -17,3 +17,25 @@
|
|
17
17
|
|
18
18
|
|
19
19
|
などで取得したものをjson_decodeするべきではと思います。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
urlencodeも必要でした。
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
<?php
|
28
|
+
|
29
|
+
$url="http://api.calil.jp/library?appkey=&limit=2&pref=" . urlencode("埼玉県") . "&city=&geocode=&format=json&callback=";
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
$json= file_get_contents($url);
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
$json= json_decode($json);
|
38
|
+
|
39
|
+
var_dump($json);
|
40
|
+
|
41
|
+
```
|