Jump to content

A PHP Challenge: Is it possible? Make it so number one.


thepassionofchad

Recommended Posts

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

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.