Jump to content

Does refering URL always work?


matrix211v1

Recommended Posts

Hello All!

 

I have Apache installed as my web server. On a different server with web page content, like CNN for example, they are going to link to a graphic on my server.

 

My question is this. If someone goes to the CNN page with their browser, it should call the web page of CNN, which in turn will call the graphic located on my machine. Can I record the EXACT url where it was called from OR is it limited to the Host?

 

Another way to look at this is if you went to a person's MySpace page, who had a graphic that was on my server. Will I be able to go to that individual's MySpace account and see my graphic there OR is it just going to tell me it came from MySpace.

 

Thanks in advance.

 

P.S.

I also have PHP installed, and it there is a way to record the URL, I would like to know how to do that.

Link to comment
Share on other sites

The HTTP_REFERER server variable should do the job

 

IN PHP it is $_SERVER['HTTP_REFERER']

 

Keep in mind that not all web browsers send the referring url. This is optional. It can also be spoofed too. SO be aware of this.

 

Another way is to look in your servers access log you should see log entries to every file that has being requested from your site. However it only lists the IP address and not the referring url, but I think that can be changed in the httpd.conf

 

To be honest there is no defacto way of "tracking" where x file is being hot linked to. What stops people from downloading the file to their site and not hot linking from your site?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.