fix link detection in php