- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- mb_detect_encoding: documentation ( source)
<?php
$contents = file_get_contents("https://www.aoimorishinkin.co.jp/rone.html");
$detect_order = 'JIS, eucjp-win, sjis-win, EUC-JP, sjis, UTF-8';
$detected = mb_detect_encoding( $string, $detect_order, TRUE );
var_dump($detected);