Re: Test links?

From: Date: Sun, 01 Dec 2002 00:23:53 +0000
Subject: Re: Test links?
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-126579@lists.php.net to get a copy of this message
Thanks for the help and suggestions everybody! I think some of my problems stemmed from the affiliate links being redirected and PHP saw that as dead(so to speak)... but I think I got it now. I made another column in the database to note a redirection for ones that the url fails but the $url[host] passes. Robert Packer "Chris Hewitt" <g0pae@manordat.demon.co.uk> wrote in message news:3DE90F31.9080100@manordat.demon.co.uk... > Rob Packer wrote: > > >Okay, I'm confused... file, fopen, and fsockopen seem to say not found on > >alot valid URLs... does this look to be correct usage? > >$url = $row[0]; // just get the url from the db > >$fp = implode ('', file ($url)); > > if (!$fp) {echo "<font color=red><b>Unable to access > > file</b></font>"; } > > else { fclose($fp); echo "The link is working!"; } > > > >It seems I always get this warning... > > > >Warning: Supplied argument is not a valid File-Handle resource in > >/web/home/nrc.net/www/robert/links4.php on line 11 > > > I think you have assigned $fp to be the imploded string, not a file > pointer. Thus fclose($fp) would generate an error. Given this, I'm not > sure what "if (!$fp)" would mean. > > HTH > Chris > >

« previous php.general (#126579) next »