thepassionofchad Posted March 31, 2008 Share Posted March 31, 2008 Well, I've been racking my brain to figure out how to make this work. I know no PHP, and this problem has pushed me to start studying. So here it is, your PHP challenge. When someone loads a forum page that includes an image like this one.. [*IMG]www.website.com[*/IMG] it loads a cookie from www.website.com. Well I need to control the referrer in that cookie and make it not be the forum. I at least need to remove the referrer, or at best make the referrer a different site. I've heard this might not be possible with PHP, therefore I issue the challenge. I've been up all night researching and I'm quite tired, I'll check this post back in the morning (or late afternoon) to see if it is indeed possible. Thanks for all the great responses and genius ideas I hope to find when I awake, Chad Link to comment https://forums.phpfreaks.com/topic/98795-a-php-challenge-is-it-possible-make-it-so-number-one/ Share on other sites More sharing options...
maexus Posted March 31, 2008 Share Posted March 31, 2008 So, just so I can understand. When an image is inserted into a page, you want to grab a cookie from that domain and control the referer? If I have siteone.com and pull an image from example.com, PHP won't let siteone.com access example.com's cookies, for obvious security reasons. Also, the only data that can be pulled through <img/> is image data. Link to comment https://forums.phpfreaks.com/topic/98795-a-php-challenge-is-it-possible-make-it-so-number-one/#findComment-505578 Share on other sites More sharing options...
blackcell Posted March 31, 2008 Share Posted March 31, 2008 I think it may be near to or impossible, and it is all due to the security risk. Link to comment https://forums.phpfreaks.com/topic/98795-a-php-challenge-is-it-possible-make-it-so-number-one/#findComment-505597 Share on other sites More sharing options...
thepassionofchad Posted March 31, 2008 Author Share Posted March 31, 2008 I've been using .htaccess to: Redirect /picture.jpg http://website.com/pics/script.php with script.php = <?php header('Location: http://www.website.com'); ?> to essentially load the cookies from website.com onto the forum when I post: [*IMG]www.webite.com/picture.jpg[*/IMG] So no way PHP or .htaccess can remove or change the referrer? Bummer. Looks like this is harder than I thought. Link to comment https://forums.phpfreaks.com/topic/98795-a-php-challenge-is-it-possible-make-it-so-number-one/#findComment-505895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.