RE: [PHP] webpage link validation

From: Date: Mon, 21 Sep 2009 19:11:39 +0000
Subject: RE: [PHP] webpage link validation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-298245@lists.php.net to get a copy of this message
> Several ways that I can think of: > > * use the file_get_contents() which like you said, could be > overkill > * shell out to wget to retrieve just the headers for the path. > You'd be looking for a 200 return code, which indicates the URI > exists. > * lastly, you could use fopen() to open the file, and use the > return from the fopen() call to indicate a success of failure > > Thanks, > Ash you forgot probably the best one, an HEAD call via curl library ( http://uk3.php.net/curl ) if present Regards _________________________________________________________________ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx

« previous php.general (#298245) next »