差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン | 最新のリビジョン両方とも次のリビジョン | ||
start [2022/11/22 08:25] – ともやん | start [2022/11/27 03:27] – ともやん | ||
---|---|---|---|
行 136: | 行 136: | ||
====== Dokuwiki Top ====== | ====== Dokuwiki Top ====== | ||
<php> | <php> | ||
- | function curlGet($url, | + | function curlGet($url, |
$curl = curl_init(); | $curl = curl_init(); | ||
| | ||
curl_setopt($curl, | curl_setopt($curl, | ||
- | curl_setopt($curl, | + | curl_setopt($curl, |
curl_setopt($curl, | curl_setopt($curl, | ||
curl_setopt($curl, | curl_setopt($curl, | ||
行 153: | 行 153: | ||
//$json = curlGet(' | //$json = curlGet(' | ||
//$json = curlGet(' | //$json = curlGet(' | ||
- | $json = curlGet(' | + | //$json = curlGet(' |
- | $json = mb_convert_encoding($json, ' | + | $html = curlGet(' |
+ | //$html = curlGet(' | ||
+ | $html = mb_convert_encoding($html, ' | ||
+ | preg_match_all('/ | ||
+ | $html = $matchs[' | ||
+ | $json = json_encode($matchs[' | ||
+ | //$json = json_decode($matchs[' | ||
//$usdjpy = json_decode($json, | //$usdjpy = json_decode($json, | ||
- | $usdjpy = json_decode($json, | + | echo '< |
- | $cnhjpy = json_decode($json, | + | echo 'var quotes = ' . $json . ';'; |
+ | echo '</ | ||
+ | $usdjpy = []; //json_decode($json, | ||
+ | $cnhjpy = []; //json_decode($json, | ||
+ | // | ||
+ | // | ||
+ | // | ||
// | // | ||