http-referer

How to use $_SERVER['HTTP_REFERER'] correctly in php?

穿精又带淫゛_ 提交于 2019-11-28 06:51:40
问题 Lets say i have two pages page1.php and page2.php and i want page2.php to be displayed only if it is redirected form page1.php and i inserted this code to page2.php if($_SERVER['HTTP_REFERER'] == "page1.php") { //keep displaying page2.php }else{ //if it is not redirected from page1.php header('Location:page1.php') //redirect the user back to page1.php } this code worked fine until i have a form and a submit button on page2.php when the submit button is clicked the page refreshes which means

Email Tracking - GMail

十年热恋 提交于 2019-11-28 04:45:41
I am creating my own email tracking system for email marketing tracking. I have been able to determine each persons email client they are using by using the http referrer but for some reason GMAIL does not send a HTTP_REFERRER at all! So I am trying to find another way of identifying when gmail requests a transparent image from my server. I get the following headers print_r($_SERVER); : DOCUMENT_ROOT = /usr/local/apache/htdocs GATEWAY_INTERFACE = CGI/1.1 HTTP_ACCEPT = */* HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.3 HTTP_ACCEPT_ENCODING = gzip,deflate,sdch HTTP_ACCEPT_LANGUAGE = en-GB

Alternative for $_SERVER['HTTP_REFERER'] PHP variable in MSIE

孤街浪徒 提交于 2019-11-27 22:13:44
I have used $_SERVER['HTTP_REFERER'] variable in my application (used PHP). On Firefox above variables is wokring. But i observed that $_SERVER['HTTP_REFERER'] is not working on Microsoft Internet Explorer 8. I also got to know that HTTP_REFERER variable doesnt work on MSIE8 and MSIE7. Please give me your suggestions, how to use $_SERVER['HTTP_REFERER'] variable to get rid on MSIE7/8 or is there any other alternative for $_SERVER['HTTP_REFERER'] variable Thanks for your suggestion. -Pravin. If you only need to use the referrer information internally for your website (ie: between pages of your

Can I rely on Referer HTTP header?

可紊 提交于 2019-11-27 20:25:37
Can I rely on Referer HTTP header in my web application? I want to check if the user came from a particular domain/webpage, and if he or she did, then change the layout of my site accordingly. I know that people can disable Referer in their browsers. Any ideas how often users do that? Can I rely on Referer being present in 99%? As a general rule, you should not trust the HTTP Referer Header for any matter of importance, except for purely informative statistical analysis of who your visitors are or when looking for patterns of behaviour among the users of your own site. Under no circumstance it

http_referer lost using https

我的未来我决定 提交于 2019-11-27 18:39:44
问题 Picture two web pages, both viewed using https. They reside on different domains. How can I (reasonably) ensure that someone arriving at my page came via a hyperlink that resides on another (specific) domain? I only want to allow traffic from that domain. Any ideas on the best way to accomplish this would be appreciated. I tried looking at the HTTP_REFERER, but apparently it is not being sent in this case. I know that the HTTP RFC specifies not sending the referrer info from https -> http,

ASP.NET - Response.Redirect Not Populating Url Referrer

℡╲_俬逩灬. 提交于 2019-11-27 17:47:50
问题 I feel like i've done this a ton of times, but i can't for the life of me figure out what is going wrong. Default.aspx: protected void Page_Load(object sender, EventArgs e) { var r1 = Request.UrlReferrer; // null var r2 = Request.ServerVariables["HTTP_REFERRER"]; // null } SingleSignOn.aspx: protected void Page_Load(object sender, EventArgs e) { Response.Redirect("/"); } If i type "/SingleSignOn.aspx" in the URL, it redirects to Default.aspx, but the referrer is null. What am i missing here?

How to save http referer in rails

有些话、适合烂在心里 提交于 2019-11-27 12:35:33
问题 I'm trying to save the site that a user came from when they sign up. Right now I have a before_filter in my ApplicationController: before_filter :save_referer def save_referer unless is_logged_in? session['referer'] = request.env["HTTP_REFERER"] unless session['referer'] end end Then when a user is created, it checks this session variable and sets it to nil. Sometimes this does not work and I'm worried there might be some unintended things happening with using session like this. Does anyone

PHP - Referer redirect script

笑着哭i 提交于 2019-11-27 09:06:14
Often, when searching for answers, I have found that certain websites will allow you to read the information they offer if the referer is, for example, google.com. Yet, if you link directly to the information, it will be unavailable. What I am looking for is the smallest PHP script that will set a referer of my choice, and a destination, like so: http://example.com/ref_red.php?referer=http://google.com/&end=http://example.net/ Notes: ref_red.php is the name of the script on my example. referer and end should accept http , https , ftp . referer and end can contain an URI of any type, as simple

Get referrer URL - visitors coming from Paypal (HTTPS)

删除回忆录丶 提交于 2019-11-27 06:02:51
问题 Hi I'm trying to get the referrer url but it doesn't work when the visitor comes to the site from Paypal $ref = $_SERVER['HTTP_REFERER']; echo $ref; Is there a simple way to get the paypal url if the visitor land on the site coming from Paypal ? Edit and Clarification: I'm not looking to have any special settings on the Paypal site (including but not limited to: IPN, set the return URL, Payment Data Transfer or any other special settings on the Paypal site) All that I'm looking is to get the

Email Tracking - GMail

余生颓废 提交于 2019-11-27 05:25:55
问题 I am creating my own email tracking system for email marketing tracking. I have been able to determine each persons email client they are using by using the http referrer but for some reason GMAIL does not send a HTTP_REFERRER at all! So I am trying to find another way of identifying when gmail requests a transparent image from my server. I get the following headers print_r($_SERVER); : DOCUMENT_ROOT = /usr/local/apache/htdocs GATEWAY_INTERFACE = CGI/1.1 HTTP_ACCEPT = */* HTTP_ACCEPT_CHARSET