referer

HTTP Referrer and IE7 and IE8

白昼怎懂夜的黑 提交于 2019-12-23 08:35:48
问题 Hi i've tried the following to find the referrer in MSIE / IE7 and IE8 but its returning blank each time; PHP: <? echo $_SERVER['HTTP_REFERER']; ?> JAVASCRIPT: document.write('Thanks for visiting from ' + document.referrer); Does any know what the issue could be I'm referering using document.location from a page on another domain and work fine with all other browsers minus MSIE. Any help would be great! 回答1: The HTTP Referer header is not required by the HTTP Protocol : It is only sent as an

Check if pop-up blocker is enbled when open new tab

余生长醉 提交于 2019-12-22 03:51:27
问题 I want to open new window in new process/context in chrome, (Im not sure if it possible with window.open but with the following example its working ) currently if it was regular window you can check with the following example and to see if the pop-up blocker is enabled ar newWin = window.open(url); if(!newWin || newWin.closed || typeof newWin.closed=='undefined') { //POPUP BLOCKED } but I want to open the new window in new process without window.open like following var prod = document

How to redirect page and js using javascript on external domain based on referer?

∥☆過路亽.° 提交于 2019-12-13 05:34:30
问题 I have some sites mysite1.com , mysite2.com ,.... mysiten.com All mysite1-n.com using external javascript on myexternalsite.com/mainfile.js I want, if ( mysite1-n.com ) visitors come from www.google.com then will redirect to welcome.com if ( mysite1-n.com ) visitors come from www.yahoo.com then will redirect to welcome2.com if ( mysite1-n.com ) visitors come from www.anotherdomain.com then will call javascript on myexternalsite.com/file1.js and working using this script And if ( mysite1-n.com

Restricting access if not coming from certain referer(s) PHP

半城伤御伤魂 提交于 2019-12-12 14:46:25
问题 I am racking my brain as to why this isn't working. What I would like to achieve, is to restrict access to a page on my own Website, only if coming from a certain website, Facebook for instance. Since a link will be posted on 1 or more Facebook pages and/or my personal profile, would like the script to execute if coming from Facebook and/or any other "PAGES" it's posted on. For instance, if I post my link on www.facebook.com/This_is_my_PAGE or is posted on my personal profile www.facebook.com

cakephp : go to previous page after editing a player

a 夏天 提交于 2019-12-12 04:37:31
问题 I have players in pages. I'm for instance on page 13. Here I click on the edit function to edit a player. Now after the edit I want to get back to that page 13 but It stays at the edit page. edit action : public function admin_edit($id = null) { if (!$this->Player->exists($id)) { throw new NotFoundException(__('Invalid player')); } if ($this->request->is(array('post', 'put'))) { $data = $this->request->data['Player']; if(!$data['player_image']['name']){ unset($data['player_image']); } if (

S3 bucket policy access conditions

谁都会走 提交于 2019-12-11 11:51:21
问题 I have an s3 bucket policy like this which denies requests if the referer is not listed under { "Sid": "6", "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my_bucket_name/*", "Condition": { "StringNotLike": { "aws:Referer": [ "http://example1.com/*", "http://example2.com/*", "https://*amazon.com*/*" ] } } } note i tried https://*amazon.com*/*, https://*aws.amazon.com* ,https://*amazon.com*,http://*amazon.com* my problem is that I am not able to get

Mechanize + Python: how to follow a link in a simple javascript?

£可爱£侵袭症+ 提交于 2019-12-11 05:15:48
问题 short: How to execute/simulate javascript redirection with python Mechanize? location.href="http://www.site2.com/"; I've made a python script with mechanize module that looks for a link in a page and follows it. The problem is on a particular site that when I do br.follow_link("http://www.address1.com") he redirects me to this simple page: <script language="JavaScript">{ location.href="http://www.site2.com/"; self.focus(); }</script> Now, if I do: br = mechanize.Browser(factory=mechanize

Is the REFERER set if you redirect to a new web page using location.href =?

一世执手 提交于 2019-12-10 03:41:49
问题 If you redirect a user to a new web page using the javascript location.href = <url> , what REFERER header does the destination web server see? 回答1: it sees the page it came from, just like clicking on a link. To test this from any page, redirect to a phpinfo() page or any other page that echos headers, for example: window.location='http://hosting.iptcom.net/phpinfo.php'; (page pulled from random google search) 回答2: With some exceptions, the header sent is of the page with the redirect on it,

How can PHP driven API authenticate genuine client (referer) cross-domain (knowing that headers can be spoofed)?

…衆ロ難τιáo~ 提交于 2019-12-07 03:46:23
问题 Using PHP, how do you securely authenticate an API call , cross-domain , with the following criteria: Must be called from a given domain.com/page (no other domain) must have a given key Some background: Please read carefully before answering... My web application will display a javascript widget on a client's website via a call like the one below. So we're talking about cross-domain authentication for a script to be served but only to genuine client and for a given URL only! At the moment the

symfony2 : using referer after login with fosuserbundle

一个人想着一个人 提交于 2019-12-05 21:56:36
问题 I've got problem with fosuserbundle to redirect user to the referer after login success app/config/security.yml security: encoders: FOS\UserBundle\Model\UserInterface: sha512 role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN providers: fos_userbundle: id: fos_user.user_provider.username_email firewalls: main: pattern: ^/ form_login: provider: fos_userbundle login_path: fos_user_security_login use_referer: true check_path: fos_user_security_check csrf_provider: form.csrf