referrer

How to get ip address, referer, and user agent in ruby?

此生再无相见时 提交于 2019-12-06 01:24:10
问题 I want to log user's ip address, referer, and user agent. In PHP, I can get them from the following variables: $_SERVER['REMOTE_ADDR'] $_SERVER['HTTP_REFERER'] $_SERVER['HTTP_USER_AGENT'] How to get them in ruby? 回答1: You need the array request.env request.env['REMOTE_ADDR']: 回答2: PHP is embedded in a web server. Ruby is a general-purpose language: if you need a web server context, you'll have to install it yourself. Fortunately, it's easy. One of the easiest ways to get started is with

Can I get the referrer?

偶尔善良 提交于 2019-12-05 11:22:10
问题 I have a website on which I dynamically create Javascript code using ASP.NET handler in which I should add the referrer to a database. I want to get referrer of referrer like so: website1 website2 (where I create pixel to another site) website3 (where pixel is located) I don't have code access to website1 , on website2 I can only assign JavaScript. If I get referrer in current application state I get website2 . Is there a way to get website1 as referrer? 回答1: You can pass this value along:

Android Google Play intent referrer

被刻印的时光 ゝ 提交于 2019-12-05 05:30:35
I'm launching Google Play like this: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.example")); intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); startActivity(intent); I'd like to include referrer data, as explained here: https://developers.google.com/analytics/devguides/collection/android/devguide#google-play-builder Unfortunetely it generates the url which leads to the google play website. What's the equivalent for the intent? I'd be thankful for a sample source code. Thanks. Adding referrer data to Google Play

How can I detect rel=“noreferrer” support?

我是研究僧i 提交于 2019-12-04 19:24:51
问题 Is there any way I can detect the support for rel="noreferrer" with Javascript? <a href="http://example.com" rel="noreferrer">link without referral</a> Solution - $.browser is deprecated, and it may be moved to a plugin in a future release of jQuery. var is_webkit = $.browser.webkit; if(is_webkit) { alert('supports rel="noreferrer"'); } 回答1: No, there is none. Referrer headers are outside the domain of JavaScript. If it's particularly important, you could check whether the browser ( navigator

Is it possible to remove the referrer in PHP before redirected?

血红的双手。 提交于 2019-12-04 14:59:07
But since the browser is the only thing that manages the referrer, however I was thinking about a script that removes the referrer before they are redirected to the link they want to go to. For example, http://mywebsite.com/url.php?u=http://www.stackoverflow.com Where url.php could remove the referrer and then redirect. Is it possible to do this in any way? If your redirect is an HTTP redirect then, no, you have no control over that. Nor, frankly, should you. It's the browser's business to form the REFERER value, not yours. You can actually do this in practice if you're running HTTPS on your

Launch app if installed, or open Google Play with install referrer

只愿长相守 提交于 2019-12-04 10:47:48
问题 We are trying to generate a link that, when clicked in a browser, opens our App if it's installed. This is usually done with something like this: intent://some.domain/some=parameters#Intent;scheme=somescheme;package=my.package.name If configured correctly, this uri can launch your App if it's installed, and redirect you to the play store otherwise. However, this is not what we want. We want to redirect to the play store with an install referrer . As far as we know, the intent:// syntax cannot

How to get ip address, referer, and user agent in ruby?

烈酒焚心 提交于 2019-12-04 06:23:37
I want to log user's ip address, referer, and user agent. In PHP, I can get them from the following variables: $_SERVER['REMOTE_ADDR'] $_SERVER['HTTP_REFERER'] $_SERVER['HTTP_USER_AGENT'] How to get them in ruby? timaschew You need the array request.env request.env['REMOTE_ADDR']: PHP is embedded in a web server. Ruby is a general-purpose language: if you need a web server context, you'll have to install it yourself. Fortunately, it's easy. One of the easiest ways to get started is with Sinatra . Install the gem: gem install sinatra Then create myapp.rb: require 'sinatra' get '/' do request

Can I get the referrer?

自闭症网瘾萝莉.ら 提交于 2019-12-03 23:27:14
I have a website on which I dynamically create Javascript code using ASP.NET handler in which I should add the referrer to a database. I want to get referrer of referrer like so: website1 website2 (where I create pixel to another site) website3 (where pixel is located) I don't have code access to website1 , on website2 I can only assign JavaScript. If I get referrer in current application state I get website2 . Is there a way to get website1 as referrer? You can pass this value along: document.referrer . That expression would need to be evaluated on website 2, not on website 3. So: // website2

Android referral tracking does not work

南笙酒味 提交于 2019-12-03 09:27:06
问题 I am attempting to get Android Referral tracking to work. I am following the only documentation I have found here http://code.google.com/mobile/analytics/docs/android/#referrals I have the following in my android manifest file <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> <receiver android:name="com.package.Receiver" android

JavaScript Redirect based on Referrer?

江枫思渺然 提交于 2019-12-03 02:51:12
Is there anyway to grab the referring URL using javascript, lets say the reffering url is http://page.com/home?local=fr , then redirect a user to a new page with the same local as the reffering page ( http://page.com/login?local= referring local )? Pseudo code would be something like this: var referringURL = document.referrer; var local = referringURL.substring(referringURL.indexOf("?"), referringURL.length()) var newURL = "http://page.com/login" +local; Send user to newURL Thanks, -Pete if (document.referrer != "") { var referringURL = document.referrer; var local = referringURL.substring