start

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
start [2022/11/22 08:25] ともやんstart [2025/04/22 22:35] (現在) ともやん
行 1: 行 1:
 <html> <html>
-  <script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.min.js"></script> +  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.global.prod.js"></script> 
-  <script src="/_media/javascript/ua-parser-js/ua-parser-0.7.28-gpu-ex.js"></script>+  <!--<script src="/_media/javascript/ua-parser-js/ua-parser-0.7.28-gpu-ex.js"></script>--> 
 +  <script src="https://cdn.jsdelivr.net/npm/ua-parser-js@1.0.39/dist/ua-parser.min.js"></script>
   <!-- Tomoyan.net Vue.js app start -->   <!-- Tomoyan.net Vue.js app start -->
   <script>const startTime = new Date();</script>   <script>const startTime = new Date();</script>
行 30: 行 31:
   <div id="tomoyan_net-app">   <div id="tomoyan_net-app">
 </html> </html>
-^ IP アドレス (<html>{{ ip_ver }}</html>)\\ <html><span class="font_half">REMOTE_ADDR</span></html>  | <html><code>{{ remote_addr }}</code></html>  |+^ IP アドレス (<html>{{ ip_ver }}</html>)\\ <html><span class="font_half">REMOTE_ADDR</span></html>  | <html><code>{{ remote_addr }}</code></html> |
 ^ ゲートウェイ名\\ <html><span class="font_half">gethostbyaddr(REMOTE_ADDR)</span></html>  | <php>echo '<a href="https://www.aguse.jp/?url='.gethostbyaddr($_SERVER["REMOTE_ADDR"]).'" target="_blank">'.gethostbyaddr($_SERVER["REMOTE_ADDR"]).'</a>';</php>  | ^ ゲートウェイ名\\ <html><span class="font_half">gethostbyaddr(REMOTE_ADDR)</span></html>  | <php>echo '<a href="https://www.aguse.jp/?url='.gethostbyaddr($_SERVER["REMOTE_ADDR"]).'" target="_blank">'.gethostbyaddr($_SERVER["REMOTE_ADDR"]).'</a>';</php>  |
 ^ CPU Cores\\ <html><span class="font_half">navigator.hardwareConcurrency</span></html>  | <html><p v-if="!(cpu_cores === '')"><code>{{ cpu_cores }}</code> core</p><p v-else="cpu_cores === ''">取得不能</p></html>  | ^ CPU Cores\\ <html><span class="font_half">navigator.hardwareConcurrency</span></html>  | <html><p v-if="!(cpu_cores === '')"><code>{{ cpu_cores }}</code> core</p><p v-else="cpu_cores === ''">取得不能</p></html>  |
-^ [[https://ja.wikipedia.org/wiki/%E7%94%BB%E9%9D%A2%E8%A7%A3%E5%83%8F%E5%BA%A6|画面解像度]]\\ <html><span class="font_half">screen & window</span></html>  | <html><code>{{ display_resolution }}</code> pixel</html>\\ <html>(ブラウザ表示サイズ <code>{{ browser_resolution }}</code> pixel)</html>  |+^ [[https://ja.wikipedia.org/wiki/%E7%94%BB%E9%9D%A2%E8%A7%A3%E5%83%8F%E5%BA%A6|画面解像度]]\\ <html><span class="font_half">screen &amp; window</span></html>  | <html><code>{{ display_resolution }}</code> pixel</html>\\ <html>(ブラウザ表示サイズ <code>{{ browser_resolution }}</code> pixel)</html>  |
 ^ ダークモード\\ <html><span class="font_half">CSS @media (prefers-color-scheme: dark)</span></html>  | <html><code>{{ dark_mode }}</code></html>  | ^ ダークモード\\ <html><span class="font_half">CSS @media (prefers-color-scheme: dark)</span></html>  | <html><code>{{ dark_mode }}</code></html>  |
-^ [[https://ja.wikipedia.org/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%82%A8%E3%83%BC%E3%82%B8%E3%82%A7%E3%83%B3%E3%83%88|User Agent]]\\ [[https://faisalman.github.io/ua-parser-js/|UAParser.js]] ([[javascript:json|JSON)]]  | <html><code>{{ user_agent }}</code></html><accordion><panel type="default" title="UAParser (JSON)"><html><div class="wrap_mincode"><pre>{{ ua_parser }}</pre><pre>{{ versions }}</pre></html></panel></accordion>  |+^ Vendor\\ <html><span class="font_half">navigator.vendor</span></html>  | <html><p v-if="!(vendor === '')"><code>{{ vendor }}</code></p><p v-else="vendor === ''">取得不能</p></html> 
 +^ [[https://ja.wikipedia.org/wiki/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%82%A8%E3%83%BC%E3%82%B8%E3%82%A7%E3%83%B3%E3%83%88|User Agent]]\\ [[https://faisalman.github.io/ua-parser-js/|UAParser.js]] ([[javascript:json|JSON)]]  | <html><code>{{ user_agent }}</code></html><accordion><panel type="default" title="UAParser (JSON)"><html><div class="color_term"><div class="wrap_mincode"><pre>{{ ua_parser }}</pre><pre>{{ versions }}</pre></div></div></html></panel></accordion>  |
 ^ [[https://html5test.com|The HTML5 test - How well does your browser support HTML5?]]  || ^ [[https://html5test.com|The HTML5 test - How well does your browser support HTML5?]]  ||
 <html> <html>
行 41: 行 43:
   <!-- Tomoyan.net Vue.js app end -->   <!-- Tomoyan.net Vue.js app end -->
 </html> </html>
-<php>echo '<script>const REMOTE_ADDR = "'.$_SERVER["REMOTE_ADDR"].'"; </script>';</php>+<php> 
 +  echo '<script>const REMOTE_ADDR = "'.$_SERVER["REMOTE_ADDR"].'"; </script>'; 
 +</php>
 <html> <html>
   <script>   <script>
 +    "use strict";
     const { createApp } = Vue     const { createApp } = Vue
 +    
     let ua_parser;     let ua_parser;
     const tomoyan_net_app = createApp({     const tomoyan_net_app = createApp({
       data() {       data() {
         return {         return {
-          remote_addr: REMOTE_ADDR, 
           cpu_cores: '',           cpu_cores: '',
           display_resolution: '',           display_resolution: '',
           browser_resolution: '',           browser_resolution: '',
           user_agent: navigator.userAgent,           user_agent: navigator.userAgent,
 +          vendor: navigator.vendor,
           ua_parser: '',           ua_parser: '',
           versions: '',           versions: '',
行 59: 行 65:
         }         }
       },       },
-      created() {+      async created() { 
 +        this.remote_addr = REMOTE_ADDR.indexOf(':') !== -1 ? REMOTE_ADDR + ' (IPv4: ' + await this.get_ip4addr() + ')' : REMOTE_ADDR; 
 +        window.addEventListener('resize', this.get_display_resolution);
         this.get_display_resolution();         this.get_display_resolution();
         this.get_cpu_cores()         this.get_cpu_cores()
行 93: 行 101:
                             navigator.hardwareConcurrency :                             navigator.hardwareConcurrency :
                             '');                             '');
 +        },
 +        async get_ip4addr() {
 +          // https://www.ipify.org/
 +          let ip4addr;
 +          try {
 +            ip4addr = (await (await fetch('https://razor-ramon4.tomoyan.net/remote_addr?format=json', {mode: 'cors'})).json()).ip;
 +          }
 +          catch (error) {
 +            console.error(error);
 +            ip4addr = error;
 +          }
 +          return ip4addr;
         },         },
       },       },
行 104: 行 124:
             console.log('Ready:', diffReadyTime / 1000);             console.log('Ready:', diffReadyTime / 1000);
         }*/         }*/
-      }, 
-      setup() { 
-        window.addEventListener('resize', this.set_display_resolution) 
       },       },
       beforeDestroy() {       beforeDestroy() {
-        window.removeEventListener('resize', this.set_display_resolution)+        window.removeEventListener('resize', this.get_display_resolution);
       },       },
     }).mount('#tomoyan_net-app')     }).mount('#tomoyan_net-app')
行 136: 行 153:
 ====== Dokuwiki Top ====== ====== Dokuwiki Top ======
 <php> <php>
-function curlGet($url, $referer) {+function curlGet($url, $referer='') {
   $curl = curl_init();   $curl = curl_init();
      
   curl_setopt($curl, CURLOPT_URL, $url);   curl_setopt($curl, CURLOPT_URL, $url);
-  curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');+  curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 証明書の検証を行わない   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 証明書の検証を行わない
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);  // curl_execの結果を文字列で返す   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);  // curl_execの結果を文字列で返す
行 153: 行 170:
 //$json = curlGet('https://www.gaitameonline.com/rateaj/getrate'); //$json = curlGet('https://www.gaitameonline.com/rateaj/getrate');
 //$json = curlGet('https://info.finance.yahoo.co.jp/fx/async/getRate'); //$json = curlGet('https://info.finance.yahoo.co.jp/fx/async/getRate');
-$json = curlGet('https://finance.yahoo.co.jp/web-fx/ajax', 'https://finance.yahoo.co.jp/quote/USDJPY=FX'); +//$json = curlGet('https://finance.yahoo.co.jp/web-fx/ajax', 'https://finance.yahoo.co.jp/quote/USDJPY=FX'); 
-$json = mb_convert_encoding($json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN');+$html = curlGet('https://www.google.com/finance/quote/USD-JPY'); 
 +//$html = curlGet('https://www.google.com/finance/quote/CNH-JPY'); 
 +$html = mb_convert_encoding($html, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN'); 
 +preg_match_all('/AF_initDataCallback\(\{.*?(?<json>.*?)\}\);/', $html, $matchs); 
 +$html = $matchs['json'][3]; 
 +$json = json_encode($matchs['json']); 
 +//$json = json_decode($matchs['json'][1], false); 
 //$usdjpy = json_decode($json, true)['quotes'][20]; //$usdjpy = json_decode($json, true)['quotes'][20];
-$usdjpy = json_decode($json, true)['USDJPY']; +echo '<script>'; 
-$cnhjpy = json_decode($json, true)['CNHJPY'];+echo 'var quotes = ' . $json . ';'; 
 +echo '</script>'; 
 +$usdjpy = []; //json_decode($json, true)['USDJPY']; 
 +$cnhjpy = []; //json_decode($json, true)['CNHJPY'];
  
 +//print_r($matchs['json']);
 +//print_r($json);
 +//print_r($html);
 //print_r($usdjpy); //print_r($usdjpy);
  
行 209: 行 239:
 | [[windows|🍱Windows 関連]]  |       | | [[windows|🍱Windows 関連]]  |       |
 ^ 言語  ^^^^ ^ 言語  ^^^^
-| [[python|🐍Python 関連]]  | [[python:django|🎸Django Framework 関連]]  | [[php|🐘PHP 関連]]  | [[ruby|💍Ruby 関連]]  | +| [[python|🐍Python]]  | [[python:django|🎸Django Framework]]  | [[php|🐘PHP]]  | [[ruby|💍Ruby]] 
-| [[html_css|🚾HTML + CSS 関連]]  | [[javascript|🈁JavaScript 関連]]  | [[c_cpp|🍋C/C++ 関連]]  | [[rust|🦀Rust 関連]]  | +| [[html_css|🚾HTML + CSS]]  | [[javascript|🈁JavaScript]]  | [[typescript|🈁TypeScript]]  |  | 
-| [[golang|🐭Go 関連]]  | [[java|☕Java 関連]]  || [[programming_language|💻プログラミング言語関連]]  |+| [[c_cpp|🍋C/C++]]  | [[rust|🦀Rust]]   | 
 +| [[golang|🐭Go]]   | [[java|☕Java]]  | [[programming_language|💻プログラミング言語]]  |
 ^ テクノロジ  ^^^^ ^ テクノロジ  ^^^^
 | [[web|Web 関連]]  | [[dotnet|.NET 関連]]  | [[hardware|ハードウェア関連]]  | [[charset|文字コード]]  | | [[web|Web 関連]]  | [[dotnet|.NET 関連]]  | [[hardware|ハードウェア関連]]  | [[charset|文字コード]]  |
行 222: 行 253:
 ^ 生活  ^^^^ ^ 生活  ^^^^
 | [[cooking|🍳ハッカ~♪ のお料理]]  | [[onsen|♨️温泉]]  | [[medical_science|🏥医学関連]]  | [[music|🎵音楽]]  | | [[cooking|🍳ハッカ~♪ のお料理]]  | [[onsen|♨️温泉]]  | [[medical_science|🏥医学関連]]  | [[music|🎵音楽]]  |
-| [[lifehacker|🏡ハッカ~♪ の生活術]]  | [[dog|🐶どっぐ]]  | [[law|⚖法律関連]]  |  |+| [[lifehacker|🏡ハッカ~♪ の生活術]]  | [[dog|🐶どっぐ]]  | [[law|⚖法律関連]] 🧠[[brain_science|みそ]]  |
  
 ^ 金融  ^^^^ ^ 金融  ^^^^
行 232: 行 263:
 [[web:brave|Brave - プライバシーを重視した高速かつ安全な次世代ブラウザ]]\\ [[web:brave|Brave - プライバシーを重視した高速かつ安全な次世代ブラウザ]]\\
 の利用をお勧めします😉\\ の利用をお勧めします😉\\
-\\ +
-<wrap em>※スマホで閲覧する場合は Chromium 系エンジンのブラウザでの閲覧はおすすめしません🤔\\ +
-ページによっては大量の出力結果を含むため、__レンダリング処理でプチフリーズ__します😱😇\\ +
-快適に閲覧するには [[https://www.mozilla.org/ja/firefox/|Firefox]] での閲覧を推奨します😊\\ </wrap>+
  • start.1669073158.txt.gz
  • 最終更新: 2022/11/22 08:25
  • by ともやん