PDA

View Full Version : php ftp connection help.... should be easy


DelFDgfd_gT
02-26-2003, 09:40 PM
i am trying to get my board to connect to ftps. When it connects it works fine but when it doesnt connect i get this

Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in /home/house/public_html/living/site/showthread.php on line 733

Warning: fsockopen() [function.fsockopen]: unable to connect to 1.2.2.3:24 in /home/house/public_html/living/site/showthread.php on line 733

on the top of the thread page

how would i make it not show these errors?

MUG
02-27-2003, 12:29 AM
You can suppress output by putting an @ symbol before the function name. Example:if($fs = @fsockopen('site.com',80)) {
echo "Connection established.";
} else {
echo "Could not connect.";
}

DelFDgfd_gT
02-27-2003, 04:50 AM
works wonders as always! thanks