added compatibility with PHP versions prior 4.3.0

This commit is contained in:
sparc 2005-10-12 17:12:48 +00:00
parent 3a8410f03c
commit 1ff02ad821
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,6 @@
2005/10/12 David Saez <david@ols.es>
- added compatibility with PHP versions prior 4.3.0
2005/10/11 David Saez <david@ols.es>
- fixed warning for non-existant .es domains

View file

@ -198,7 +198,12 @@ class WhoisClient {
$output = str_replace('<tr',"\n<tr",$output);
$output = str_replace('<TR',"\n<tr",$output);
$output = str_replace('&nbsp;',' ',$output);
$output = html_entity_decode($output);
//$output = html_entity_decode($output); needs 4.3.0
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
$output = strtr($output, $trans_tbl);
$output = explode("\n",strip_tags($output));
$rawdata = array();