This topic is no more used, see The DebugTool support Topic
I’m trying to make a link checker for my
debug tool.
//check links don't work :(
$href='http://ww.gooredegle.fr';
$file = @fopen ($href, 'r'); // @ used to skip warning
if (!$file) {
$is_link_ok="<span style=\"color:red;\">$href FAILS! </span>\n";
} else {
$is_link_ok="$href: OK\n";fclose($file);
}
but when the link is wrong, MODx raise an error:
[tt]« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: fopen(): php_network_getaddresses: gethostbyname failed
Error type/ Nr.: Warning - 2
File: W:\www\modx\manager\includes\document.parser.class.inc.php(705) : eval()’d code
Line: 86[/tt]
Anyone as an idea ? Now I use socket.