Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Image - using php, need referrer

Status
Not open for further replies.

Convictions

Programmer
Mar 29, 2008
3
I am using a php script to dynamically display images. Using mod_rewrite I send a request like:

Code:
<img src="[URL unfurl="true"]www.convictionscommunity.com/pics/111111"[/URL] />

Then it is sent to show_image.php?id=111111

The image is shown. This all works. I want to include a logging mechanism to let me know where my images are being displayed from, ie: myspace, etc. Is there a way to do this?

Thanks in advance.

Chris
 
it is possible that $_SERVER['HTTP_REFERER'] will contain some useful information but it is not a mandatory field for a browser to populate.
 
It appears that server variable doesn't get set because it isn't a clicked link.

Or am I missing something... there has to be a way to do this.

??

Thanks.
 
... there has to be a way to do this

If you control the sites where the image is being displayed, you can add extra parameters to the image call. If you do not control the sites, thank goodness there has NOT to be a way to do this. Referer headers are optional, can be set to whatever the user likes, or just switched off by users who do not like to be tracked.

If you want to stop people linking to your images, use a session to store a code that must be checked. If you just want to track where users come from, you will probably have more luck running a visualization tool on your web server logs.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top