Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvanvliet committed Jul 20, 2008
1 parent 66b946b commit 822393b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions sitemap/libraries/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ protected function url_exists($url){
public function ping_google(array $options=array())
{
$url='www.google.com';
try

if($request=@fsockopen($url,80))
{
$request=fsockopen($url,80);
$http = 'GET /webmasters/sitemaps/ping?sitemap=' .
urlencode($this->location).
" HTTP/1.1\r\n".
Expand All @@ -229,13 +229,10 @@ public function ping_google(array $options=array())
$response= fgets($request, 128);
fclose($request);

return (trim($response)=='HTTP/1.1 200 OK');

return (trim($response)=='HTTP/1.1 200 OK');
}
catch (Exception $e)
{
return false;
}
return false;

}

}

0 comments on commit 822393b

Please sign in to comment.