remote file existance when protected by a .htaccess
| From: | Mag | Date: | Wed, 20 Oct 2004 13:30:12 +0000 |
| Subject: | remote file existance when protected by a .htaccess | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-199898@lists.php.net to get a copy of this message | ||
Hi,
I have a form where the user specifies a remote image
so it can be made into a thumb, before that I am
trying to make sure the image exists using this code:
$chk_gallery = @fopen ($remote_image, "r");
if (!$chk_gallery)
{echo "<font color=red><b>ERROR:</b></font><br>Unable
to fetch the remote image"; exit;}
fclose($chk_gallery);
which works great except I have been getting some 403
access denied errors for some sites, checking I see
that they are protected by a htaccess file (that
checks the referrer) so i tried putting
header('referer: domain')
where domain is the parse_url['host'] of $remote_file
but that too has failed...
Any ideas?
Thanks,
Mag
=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com