0

Ok guys I use this code for avoid hotlinking:

<?php 
    <img width="150" height="42" src='data:image/png;base64,echo base64_encode(file_get_contents("/USER/images/logo.png"))'>;
?>

This code works just fine, and since I include it in all of my page it cause a problem since the file_get_contents() sent an header, and I can't sent for example another header in the same page (Where this code is included), for example for do a redirect, how can I fix this problem? This code come from: Using PHP function include() to include a png image

Note that /USER/images/logo.png is a file that isn't in the root!

0 Answers0