Mobile Phone - Gas Suppliers - Mobile Phones - Credit Cards UK - Mortgage Calculator

PDA

View Full Version : reporting the status of a domain name using fsocopen


softgroups
Sep 18th 2007, 1:42 pm
$domain='softgroups21.com'; / invalid domain name
$fp = fsockopen($domain, 80, $errno, $errstr, 5);
if (!$fp) {
echo "dead 404";exit;
} else { echo "$domain ---- working?!";}



it's reporting to me as working!!!!

sea otter
Sep 18th 2007, 8:07 pm
I'm assuming your / in the first line is supposed to be a //

The code worked fine for me; it printed "dead 404"