A
Anonymous
Guest
Hi,
I've come accross a problem. For a customer, we implemented a Google search. They have a deal with Google and thus are allowed to offer that.
To get the searchresults from Google, we use fsockopen like this:
Sometimes $socketHandle is null or false, but still $errorNumber is 0 and so is $errorMessage...
How can I track the reason for failing to open the socket?
Coditor
I've come accross a problem. For a customer, we implemented a Google search. They have a deal with Google and thus are allowed to offer that.
To get the searchresults from Google, we use fsockopen like this:
Code:
$socketHandle = fsockopen($googleHost, $googlePort, &$errorNumber, &$errorMessage, 10);
if (! $socketHandle) {
echo "\n";
return;
}
Sometimes $socketHandle is null or false, but still $errorNumber is 0 and so is $errorMessage...
How can I track the reason for failing to open the socket?
Coditor