PHP Conversion International Code
if (Isset ($_get[' order_id ')) && $_get[' order_id ']!== ') {$oid =$_get[' order_id ']; $result = $db->execute (" Select ' D_no ' from ' delivery ' where ' oid ' = '. $oid]; $delivery _no= "; if ($result->recordcount () >0) {while (!$ result->eof) {$delivery _no= $result->fields[' d_no '); $result->movenext ();} if ($delivery _no!== ") {$html =file_get_contents (' Http://tracking.post.japanpost.jp/service/singleSearch.do? Searchkind=s004&locale=ja&reqcodeno1= '. $delivery _no); if ($html) {Preg_match_all ('/
][^>] *> (. *) <\/table>/si ', $html, $tables); unset ($tables [0]), function getutfstring ($string) {$encoding = mb_detect_encoding ($string, Array (' ASCII ', ' UTF-8 ', ' Shift-jis ', ' GB2312 ', ' GBK ', ' BIG5 '); return Iconv ($encoding, ' UTF-8 ', $string);//return mb_convert_encoding ($string, ' Utf-8 ', $encoding);} Echo getutfstring ($tables [1][4]);
}}}