Re: Help !!

From: Date: Thu, 07 Dec 2000 19:52:35 +0000
Subject: Re: Help !!
Groups: php.general 
Request: Send a blank email to php-general+get-29186@lists.php.net to get a copy of this message
<? $url = "http://www.freshmeat.net/"; if ( @fopen($url, 'r') ) echo "Ya we're ok eh<br>\n"; ?> Now I wont vouch 100% for this function , it wont work with header redirects, its also wont tell you if the accuall page exists, if the page doesn't exist then fopen will open the 404.html file, see. I also found on older versions of PHP <3 that it didn't allways work on HTTP/1.1 servers. more info at http://php.net/manual/function.fopen.php Chris Lee Mediawaveonline.com In article <009401c0607c$b9ab5b00$374dfea9@oemcomputer>, "emf" <contact@frouni.com> wrote: > Hi > > Can anyone tell me how to check if a domain is valid and accessible > (active) via the web ! I have a table of up to 100 urls and I would like > to write a php procedure to check every time the validity of urls. I > tried fpsockopen but it doen't work, it return true for all the urls > even for invalid urls. > > If you have an idea or an example, it will help me ! > > Thanks. > > Joseph

« previous php.general (#29186) next »