Re: 404

From: Date: Fri, 05 Jan 2001 21:17:48 +0000
Subject: Re: 404
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-32935@lists.php.net to get a copy of this message
watch out, fopen() currently doesn't follow redirects. (it did so in PHP 3 through PHP 4.0.2). so if you have a link hostname.com that redirects to www.hostname.com, which is perfectly alive, this function will report it as dead. At 22:04 5.1. 2001, Brian Clark wrote the following: -------------------------------------------------------------- >Hello Andres, > >(AA == "Andres Andres") Andres.Andres.001@mail.ee writes: > >AA> i have a problem. i want to let a php program take some links from >AA> database and display them. But before displaying them i want php >AA> to find out which ones of these links are "dead". > ><?php > >function isValidLink($url) >{ > return @fopen($url, 'r'); >} > >print( ! isValidLink('http://yahoo.com') ? >'Dead' : 'Alive'); > >?> > >-Brian > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------end of quote------ ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.general (#32935) next »