copy() and hotlinking

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sd99
Forum Newbie
Posts: 1
Joined: Thu Feb 14, 2008 1:50 pm

copy() and hotlinking

Post by sd99 »

Newbie here! I have a script that uses copy() with http addresses to grab files. However it seems to fail on sites that have hotlinking protection. Is there any way around this? Can I fake the referral somehow? Cheers
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: copy() and hotlinking

Post by Benjamin »

1. If a site has hotlink protection it's for a reason. You should contact them and receive permission to copy the content. They may provide you with a feed of some sort.
2. You cannot set the referrer using the copy function.
3. You can set the referrer using curl requests.
Post Reply