Hi all,
I use the fsockopen function to test whether a valid url has been entered or not as follows
$fp = @fsockopen($testurl, 80, $errno, $errstr, 10);
if (!$fp) {
// Generate error code
My question is about the use of @ to suppress the php errors that are generated by using fsockopen with an invalid url.
Is it 'best practice' to use the @ in this situation? I test the result of the fsockopen call by checking $fp afterwards, is that OK?
Cheers JB